Skip to content
Home » Java Programs » Java Program Example With Output

Java Program Example With Output

Java program example with output help beginners learn java by allowing them to practice program-like patterns and sophisticated java code. will help you to learn java programs. This website will assist you in learning Java programs with source code for beginners to learn basic java programming examples with source code. 

The best method to learn is to practice not only for Java programs but also for 100 or more. Patience is required when you begin to learn Java. 

For those looking for a job in a respected company, here is a basic programs in java for freshers to learn java. You may learn about operators, syntax, and program structure by using these java programs for interview.

Applications of Java Programming

Java is one of the most widely used programming languages today, and it is rapidly gaining popularity in the software industry. 

We can find Java programs for interview help beginners learn java by allowing them to practice program-like patterns and sophisticated java code. for Sorting in practically every industry, including application and web development, big data, artificial intelligence, mobile development, and so on.

Java Program Example With Output

  1. Hello World Program in Java 
  2. Java Program to Print the Number 
  3. Swapping of Two Numbers in Java With Temporary Variable 
  4. Even or Odd Program in Java Using If Else 
  5. Java Program to Check Vowel or Consonant Using If Else 
  6. Greatest of Three Numbers in Java Using Nested If 
  7. Sum of First 10 Natural Numbers in Java Using For Loop 
  8. Java Program to Check Whether a Number is Factorial or Not 
  9. Java Program to Check Palindrome Without Using String Functions 
  10. Java Program to Check Prime Number Using For Loop 
  11. Armstrong Number in Java Using While Loop 
  12. Java Program for Calculator Using Switch Case 
  13. Java Program to Calculate Percentage of Marks 
  14. Multiplication Table in Java Using For Loop 
  15. Java Program to Convert Celsius to Fahrenheit Using Scanner 
  16. Java Program to Find Perimeter and Area of Circle Using math.pi 
  17. Java Program to Print Alphabets Using Ascii Values 
  18. Java Program to Show IP Address 
  19. Java Program to Extract Digits From a Given Integer 
  20. Java Program to Reverse a Given Number Using Recursive Function 
  21. Java Program to Arrange Words in Alphabetical Order 
  22. Insertion Sort in Java Using For Loop 
  23. Quick Sort Program in Java Taking First Element as Pivot 
  24. Merge Sort Program in Java With Output 
  25. Java Program to Implement Bubble Sort Algorithm 
  26. Java Program to Convert Decimal to Binary Without Using Array 
  27. Java Program to Check If a Number is Divisible by 5 
  28. Java Program to Extract Last Two Digits of a Given Year 
  29. Java Program to Find the Second Largest & Smallest Elements in an Array 
  30. Java Program to Increase Array Size 
  31. Java Program to Find Roots of Quadratic Equation 
  32. Java Program to Find Second Largest Number in an Array 
  33. Java Program to Add Two Numbers Taking Input From User 
  34. Java Program To Calculate Electricity Bill 
  35. Java Program for Radix Sort 
  36. Descending Order Program in Java
  37. Sum of n Natural Numbers in Java Using For Loop 
  38. Perimeter of Rectangle in Java Program 
  39. Java Program to Convert Decimal to Octal 
  40. Hexadecimal to Decimal Program in Java 
  41. Java Program to Convert From Octal to Hexadecimal Number 
  42. Java Program to Convert Hexadecimal to Decimal 
  43. Binary Multiplication in Java 
  44. Right Angle Triangle Pattern Program in Java 
  45. Diamond Pattern in Java Using For Loop 
  46. Display Special Characters in Java 
  47. Triangle Pattern Using Numbers in Java 
  48. Number Pattern in Pascal in Java Program 
  49. Diamond Pattern Numbers Program in Java 
  50. Java Program to Print Pyramid Pattern of Numbers 
  51. Star Pattern Program in Java Using For Loop 
  52. Pascal Triangle Pattern Program in Java 
  53. Mirrored Right Triangle Star Pattern in Java 
  54. Pyramid Pattern in Java Using For Loop 
  55. Java Program to Check Whether a Character is Uppercase or Lowercase 
  56. Java Program to Convert Days into Years Months and Days 
  57. Check Two Numbers For Equality in Java 
  58. Sum of Two Numbers Using Recursion Java 
  59. Swapping of Two Numbers in Java Using XOR 
  60. Sum of Digits Using Recursion Function in Java 
  61. Descending Order in Java Using For Loop 
  62. Ascending Order in Java With Example 
  63. Binary Search Program in Java Using Array 
  64. Inverted Triangle Pattern in Java 
  65. Hello World Program in Java Without Using a Semicolon 
  66. Concatenate Two Strings in Java Using Scanner 
  67. Sum of Multiple Numbers by Passing Arguments in Java 
  68. Weekdays Using a Switch Statement in Java 
  69. Java Program to Find Cube of a Number 
  70. Java Method to Display the Middle Character of a String 
  71. Java Program to Calculate Cubic Capacity in Bikes 
  72. Pencil Count Program in Java 
  73. Java Program to Print Numbers From 1 to 10 Using For Loop 
  74. Logical Operators in Java Example Program 
  75. Pattern Program Using Numbers in Java 
  76. Arrow Pattern in Java 
  77. Print Star in-between of Numbers in Java 
  78. Java Program to Calculate Sum and Average of an Array 
  79. Split Array in Java Example 
  80. Java Program to Print Odd and Even Numbers From an Array 
  81. Java Program to Sort Strings in an Alphabetical Order 
  82. Delete Array Element in Java 
  83. Add Elements to Array in Java 
  84. Java Program to Find Largest Number in an Array 
  85. Java Mortgage Calculator Source Code 
  86. Java Program to Transpose a Matrix 
  87. Java Program to Delete an Element From an Array 
  88. Replace Element in arraylist Java 
  89. Program For Array Rotation in Java 
  90. Find Out Duplicate Number Between 1 to N Numbers in Java 
  91. Delete Node Element in Linked List Java 
  92. Reverse Linked List in Java Program 
  93. Java Program to Create and Display a Singly Linked List 
  94. Concatenate of Three Linked List in Java 
  95. Count Characters in String Java 
  96. Compare Objects in Java 
  97. Graphics Program in Java Applet 
  98. Applet Program in Java 
  99. GCD Program in Java Using Recursion 
  100. Abstract Class in Java Example Program 
  101. Continue Statement in Java Example 
  102. Java Program for Fibonacci Series Using Recursion and Loop 
  103. How to Find Size of Array in Java 
  104. X Star Pattern Java Program 
  105. Java Program To Check If Two Matrices Are Equal 
  106. Java Program to Search an Element in an Array 
  107. Get Current Date and Time in Java 
  108. Merge Two Arrays in Java Program 
  109. Multiplication of Two Matrix in Java 
  110. Subtraction of Matrix in Java Program 
  111. Program To Check If Two Strings Are Anagrams In Java 
  112. Count Even and Odd Numbers in Java Using For Loop 
  113. Multiplication of Matrix in Java 
  114. Java Program to Add Two Matrices of Same Size 
  115. Java Round Double to 2 Decimal Places 
  116. Remove Whitespace From String Java 
  117. Lower Triangular Matrix 
  118. Java Program to Display the Upper Triangular Matrix 
  119. Printing Alphabets in Java 
  120. Lexicographical Order Java 
  121. Java Program to Count Vowels and Consonants in a String 
  122. Java Program to Calculate Standard Deviation 
  123. Factors of a Number in Java 
  124. Armstrong Number Program in Java Using If Else 
  125. GCD of Two Numbers in Java 
  126. Prime Number Between Given Range in Java 
  127. Calculate Power of a Number Using a While Loop in Java 
  128. Java String Parse 
  129. Encapsulation In Java With Real Time Example 
  130. Hollow Diamond Pattern in Java 
  131. Caesar Cipher Program in Java With Output 
  132. How to Call a Method in Java From Another Class Example 
  133. Heap Sort Program in Java With Explanation 
  134. Leap Year Program in Java Using If Else 
  135. Exponent Numbers Program in Java Using While Loop 
  136. Pi Value in Java 
  137. Java Program to Find the Length and Height of a Cuboid 
  138. Java Program to Display Uppercase and Lowercase Alphabets 
  139. Continue Statement in Java With Example 
  140. Selection Sort in Java With User Input 
  141. Singly Linked List Implementation in Java 
  142. Random Number Generator in Java Without Repetition 
  143. LCM Program in Java Using For Loo
  144. Ascending Order in Java Using If Else Statement 
  145. Java Program to Implement Quick Sort in Ascending Order 
  146. Bubble Sort Program in Java With Explanation
  147. Java Program to Increment by 1 All the Digits of a Given Integer