JAVA-Assignment-Final
JAVA-Assignment-Final
Descriptive Questions:
Programs:
1. Write a java program to find input value is Armstrong number or not.
2. Write a java program to find input value is Palindrome number or not.
3. Write a java program to generate a Fibonacci series.
4. Write a java program to find number is prime or not.
5. Find out biggest between 3 integer using ternary operator, 3 numbers should come from
command line.
6. Write a java program to input some kind of information of a person from the keyboard.
Age of a person
Height of a person
Weight of a person and display it in the following manner. e.g.
So, you're 35 years old, 6'2" tall and 60KG heavy.
7. A 4-digit number is entered through keyboard. Write a program to print a new number with
digits reversed as of original one. E.g.-
INPUT: 1234 OUTPUT: 4321
INPUT: 5982 OUTPUT: 2895
8. Write down the names of 10 of your friends in an array and then sort those in alphabetically
ascending order.
9. Write a following pattern:
1
12
123
10. Create a person inherit two classes from it politician & sportsman provide constructors &
calculate salary and display functions.