Java Programming Examples With Output

Learn Java Programming Language through examples. Develop java basic programs to understand the basic concepts of Java. These are the basic Java program examples with output. After learning the procedure to develop the program try to develop it on your own and then compare the code given on the website.

Quick Navigation:- Basic, Flow Control (sum, conversion, series, pattern, number), Array, String.

Java Basic Programs

The Java basics will teach about variables, data types, how to write basic Java programs, how to read input values and display them. How to perform basic arithmetic operations in Java, and how to solve basic formula based problems using Java programming language.

Java Flow Control Programs

Java flow control programs are based on conditional control statements (if, if-else and switch-case), loop control statements (while loop, do-while loop, for-loop), and Jump control statements (continue, and break). This section contains multiple Java programs. Some of them are formula-based programs, programs on different types of numbers, different types of printing patterns, flow-control-based conversion programs, and e.t.c.

Pattern Programs

Java Number Programs

Even NumberArmstrong NumberSunny Number
Odd NumberPalindrome NumberBuzz Number
Prime NumberPerfect NumberEvil Number
Twin primePronic NumberDuck Number
Magic NumberSpy NumberNelson Number
Neon NumberKaprekar NumberStrong Number
Tech NumberAutomorphic NumberSpecial Number
Harshad NumberKrishnamurthy Number Disarium Number

Array Programs in Java

=➤ See all Array Programs in Java

Multi-dimensional array and Matrix Programs in Java


Number programs using String

String programs with the help of Collection



More Programs are coming soon, keep visiting.

Subscribe to our newsletter and follow on Facebook page to receive the latest tutorial and programs to improve your programming skills.

Success! You're on the list.