# Java Programs For Practice

1

Basic Java Programs

ðŸ‘‰ Java Program to Add Two Numbers
ðŸ‘‰ Java Program to find the Product of Two Numbers
ðŸ‘‰ Java Program to check whether the Number is Even or Odd
ðŸ‘‰ Java Program to Calculate the Area and Circumference of a Circle
ðŸ‘‰ Java Program to Calculate the Area of a Rectangle
ðŸ‘‰ Java Program to the Area of Square
ðŸ‘‰ Java Program to Calculate the Area of a Triangle
ðŸ‘‰ Java Program to Calculate the Simple Interest
ðŸ‘‰ Java Program to make a Calculator using a Switch Statement
ðŸ‘‰ Java Program to Check Whether the given Number is Binary or Not
ðŸ‘‰ Java Program to print ASCII value of a Character
ðŸ‘‰ Menu Driven Program in Java
ðŸ‘‰ Currency Conversion Program in Java
ðŸ‘‰ Calculate Grade of Student using switch case
ðŸ‘‰ Java Program to Find the Distance between Two Points

Number Java Programs

1. Java Program to Swap Two Numbers Without using the Third Variable
2. Java Program to Divide two Numbers taking User's input
3. Java Program to Swap Two Numbers using the Third Variable
4. Java Program to Reverse the Number
5. Java Program to Generate Fibonacci Series
6. Fibonacci series using recursion in java
7. Java Program to Check for Leap Year
8. Java Program to  Check whether a Number is Prime or Not
9. Java Program to Generate Random Numbers
10. Java Program to Generate Random Number within the Range
11. Java Program to  Find a Factorial of a Number
12. Java Program to Find a Factorial of a Number
13. Java Program to Find the Sum of Natural Numbers
14. Java Program to  Check the palindrome Number
15. Java Program to Check Positive or Negative Numbers.
16. Java Program to Check whether the Number is Odd or Even
17. Java Program to Check Display the Odd Numbers
18. Java Program to Find the Greatest of Three Numbers.
19. Java Program to Find The LCM of Two Numbers.
20. Java Program to Find GCD of Two Numbers.
21. Java Program to Find the sum of the Digits of a Number.
22. Java Program to Find the Square Root of a Number.
23. Perfect Square Program using sqrt() function.
24. Perfect Square Program without using sqrt() function.

Special Numbers

1. Java Program to Check Armstrong number
2. Java Program for Special Number
3. Java Program to Check whether the Number is Happy Number or Not.
4. Java Program to print Happy number between 1 to 100
5. Automorphic Number Program in Java
6. Tech Number Program in java
7. Sunny Number in Java
8. Peterson Number in Java
9. Fascinating Number in Java
10. Keith Number in Java
11. Spy Number In Java
12. Java Program to Display the ATM Transaction
13. Autobiographical Number in Java
14. Java Program to Check if the Given number is Emirp Number or not.
15. Sphenic Number in Java
16. Buzz Number Program In Java
17. Duck Number in Java
18. Evil Number in Java
19. Java Program for ISBN Number
20. Java Program to check Krishnamurthy Number
21. Bouncy Number program in Java

Array Java Programs

1. Java Program to Sum all the elements in an Array
2. Java Program to Sum all the Elements in an Array
3. Java Program to Find the Largest Element in an Array
4. Java Program for the Addition of Two Matrices
5. Java Program for the Subtraction of Two Matrices
6. Java Program for the Multiplication of Two Matrices
7. Java Program to Find the Transpose of a Matrix
8. Java Program to Insert an Element in a Specified Position in an Array
9. Java Program to ISort Elements in Ascending Order of an Array
10. Java Program on How to Remove Duplicates from ArrayList
11. Java Program to  Find the Second Largest Number in an Array
12. Java Get Subarray between Specified Indexes.
13. Java program to Copy One Array to Another
14. Java program to Merge Two Arrays.
15. Reverse an Array in Java
16. Reverse an Array in Java Using Recursion
17. Three Dimensional Array Program in Java
18. Java program to Calculate Average of Elements in an Array

Loops Java Programs

• Demonstration of while, do while, and for loop
• Java Program to check the number for Palindrome using a while loop.
• Java Program to find the Sum Of Natural Numbers using while loop

Statements Java Programs

• Demonstration of if,else..if and if..elseif statement
• Java Program to Check for the Negative Number
• Java Program to Find the Greatest of Three numbers using if-else if statement
• Java Program to Calculate the Area of Different Geometric Figures using Switch.
• Java Program to Calculate Simple Interest, Amount, and Compound Interest using a Switch.

OOP Concept

• Abstraction Example in Java
• Encapsulation Example in Java
• Polymorphism Example in Java
• Inheritance Example in Java
• Java Program for super keyword
• Example of Constructor in Java
• Java Example of Inner Class
• Example of this keyword
• Method overriding example
• Single Inheritance
• Multilevel Inheritance
• Hierarchical Inheritance

Conversions

• Java Program to Convert Decimal to Binary using Recursion
• Java Program to Convert Decimal to Binary using loop
• Java Program to Convert Binary to Decimal
• Java Program to convert from Binary to Octal

String Java Programs

• Java Program for user String input
• Java Program to Check if the String is empty or not
• Java Program to check the String for Palindrome
• Java Program to Reverse a String

Files Java Programs

• Java Program to Append Content into a File
• Java Program to Check Whether a New file is Created or Already Exists.
• Java Program to Copy Content from one File to another File
• Java Program to Count the Number of Lines in a File.

Sorting Java Programs

• Bubble Sort in Java
• Selection sort in Java
• Heap Sort in Java
• Insertion Sort in Java
• Quick Sort in Java
• Merge Sort in Java
• Shell Sort in Java
• Counting Sort in Java

AWT Java Programs

• Java program to Create Login Window using AWT Controls
• Java Program to Create a Calculator Using AWT Controls

Interview Programs