Showing posts with label Sample Question of Java. Show all posts
Showing posts with label Sample Question of Java. Show all posts

Tuesday, July 20, 2021

Java Pratice Question

Sample Question 

  1. Write a program in java for accept a number and display their square.
  2. Write a program in java for accept five different number and find their average.
  3. Write a program in java for accept five different marks of subjects find their total marks and its percentages.
  4. Write a program in java for accept length and breadth find area of rectangle.
  5. Write a program in java for accept 3 different value and generate its square.
  6. Write a program in java for accept 3 different value and generate its cube.
  7. Write a program in java for accept radius and height find perimeter of circle.
  8. Write a program in java for accept perimeter of circle and find the area of circle.
  9. Write a program in java for show message “Tutorial Zone”.
  10. Write a program in java for accept two number and show its addition.
  11. Write a program in java for accept two number and find its subtraction.
  12. Write a program in java to get three angle of triangle and check it is valid or not.
  13. Write a program in java to accept three different number add all of them find out 
  14. 30% of first and second number display the result value of added number and percentage of result.
  15. Write a program in java to Accept five digit number and find their sum.
  16. Write a program in java to swap 2 numbers using third variable.
  17. Write a program in java to swap two numbers without using third variable.
  18. Write a program in java to take input from user and find their simple interest.
  19. Write a program in java to convert Fahrenheit into Celsius take input from user.
  20. Write a program in java to convert in Celsius into Fahrenheit take input from user.
  21. Write a program in java to find ASCII value of a character.
  22. Write a program in java to compute Quotient and Remainder take input from user.
  23. Write a program in java to multiply two Floating Point Numbers.
  24. Write a program in java to find Area of Sphere.
  25. Write a program in java to find Area of Square.
  26. Write a program in java to find perimeter of Rectangle and Square.
  27. Write a program in java to find Volume of cube.
  28. Write a program in java to compute Quotient and Remainder.

Sample Question (Conditional & Iteration  Based)

  1. Write a program in java to find greatest of three numbers.
  2. Write a program in java to print Fibonacci series in a given range.
  3. Write a program in java to find factorial of a given number.
  4. Write a program in java to find prime number in a given number.
  5. Write a program in java to check if given number is Armstrong or not. 
  6. Write a program in java to check if given number is palindrome or not.
  7. Write a program in java to check if given number is even or not.
  8. Write a program in java to check if given number is positive or not.
  9. Write a program in java to accept 10 different number and check how many positive and negative.
  10. Write a program in java to display palindrome numbers in a given range.
  11. Write a program in java to find out the ASCII value of a character.
  12. Write a program in java to check whether an alphabet is vowel or consonant.
  13. Write a program in java to check if given year is leap or not.
  14. Write a program in java as input from the user and reversing that number.
  15. Write a program in java to input number and sum each digit. 
  16. Write a program in java to accept two number (one base number and exponent) and calculate the power.
  17. Write a program in java take a integer from the user and display all the factor of that number.
  18. Write a program in java to accept a name and display ASCII value for each character.
  19. Write a program in java to input a number and generate a table.