Java Programs for practice
Java programs for practice will take you to the next level of understanding. Learning Java theoretically is only 20% of the training, give more emphasis to practicals. Students often claim that they have competitively good command of Java theory but less confident in developing programs. The truth is, when you do programs regularly, gradually you will understand java concepts which were earlier misinterpreted and you made foundation with wrong concepts.
If you are new to Java, we recommend you to first learn Java from Learn Java. If java is your very first programming language, we recommend you to learn C and C++, before learning java.
Begin Programming
Here at mysirg.com, we present a list of java programs, that you must do while learning java or after learning java. Make programs regularly, hope you enjoy learning.
Warm up:
- Write a java program to print Hello on the screen
- Write a java program to add two numbers(Without user input)
- Write a java program to add two numbers(With user input)
- Write a java program to calculate area of a rectangle
- Write a java program to calculate simple interest
Decision Control:
- Write a java program to check whether a given number is even or odd.
- Write a java program to find greater between two numbers
Loop:
- Write a java program to print first 10 natural numbers.
- Write a java program to print first 10 odd natural numbers.
- Write a java program to print first 10 natural numbers in reverse order.
- Write a java program to print first N natural numbers.
- Java program to print first N odd natural numbers
- Write a java program to print first N natural numbers in reverse order
- Write a java program to print first N even natural numbers
- Write a java program to calculate sum of first N natural numbers
- Write a java program to calculate sum of first N even natural numbers
- Write a program to calculate sum of first N odd natural numbers
- Write a java program to calculate factorial of a number
- Write a java program to check whether a given number is prime or not.
Command line arguments:
- Write a java program to print all command line arguments.
- Write a java program to add two numbers received from command line arguments
- Write a java program to add numbers received from command line arguments.
Classes and Objects
Mini Projects
- [purchase_link id=”1403″ style=”text link” color=”” text=”GUI base Calculator Program in Java”]
Data Structure in Java