In previous post we learnt what is java programming or introduction of java programming, In this article you will learn basic of java programming with lot of java programming exercises, examples and their solutions.
Basic of Java Programming:
Quick Links:
I have assembled a list of java programs to practice for both novice as well as intermediate programmers.
Practice more to enhance your logical thinking. After this exercises you will surely gain some confidence and knowledge about java programming.Basic Java Programming Exercises For Beginners:
- Write a first java program which prints message on the output screen.
- Write a java program to print given number is even or odd.
- Write a java program to swap two numbers.
- Write a java program to calculate gross salary of an employee using DA and HRA.
- Write a java program to print addition, subtraction, multiplication and division of given two numbers.
- Write a java program to find area of circle.
- Write a java program to find area of triangle.
- Write a java program to accept five subjects marks from student and print total and percentage on the output screen.
- Write a java program to compute expression and print on the output screen.
- Write a java program to calculate inch to meters.
- Write a java program to calculate foot to centimeters.
- Write a java program to check given number is palindrome or not.
- Write a java program to check given number is prime or not.
- Write a java program to calculate factorial of a given number.
- Write a java program to print fibonacci series.
Arrays In Java Programming Exercises:
- Write a java program to Accept and print given array elements.
- Write a java program to check whether given element is present in array or not.
- Write a java program to print Sum of given array elements.
- Write a java program to print Multiplication of given array elements.
- Write a java program to print Square of given array elements.
- Write a java program to Sort arrays in Ascending or Descending order.
- Write a java program to find length of an array.
- Write a java program to compare two arrays.
- Write a java program to copy elements of one array into another array.
I hope above java examples and their solutions will help you to understand and gain some java programming knowledge :)
No comments:
Post a Comment
If you have any doubts, please discuss here...👇