Solution:NIIT/GNIIT Sonugiri0032@gmail.com

Wednesday, February 10, 2016

Java Programs

Java Programs

Java programs are frequently asked in the interview. These programs can be asked from control statements, array, string, oops etc. Let's see the list of java programs.

1) Fibonacci series

Write a java program to print fibonacci series without using recursion and using recursion.
Input: 10
Output: 0 1 1 2 3 5 8 13 21 34

2) Prime number

Write a java program to check prime number.
Input: 44
Output: not prime number
Input: 7
Output: prime number

3) Palindrome number

Write a java program to check palindrome number.
Input: 329
Output: not palindrome number
Input: 12321
Output: palindrome number

4) Factorial number

Write a java program to print factorial of a number.
Input: 5
Output: 120
Input: 6
Output: 720

5) Armstrong number

Write a java program to check Armstrong number.
Input: 153
Output: Armstrong number
Input: 22
Output: not Armstrong number
Share:

6 comments:

tachjava said...
This comment has been removed by the author.
tachjava said...
This comment has been removed by the author.
tachjava said...
This comment has been removed by the author.
tachjava said...

Links mentioned in your blog were very useful in my interview. Thanks for sharing.

Cheers,
https://www.flowerbrackets.com/java-program-to-check-whether-number-is-prime-or-not/

tachjava said...

Your blog has best collection of java interview programs. Very helpful.

Cheers,
https://www.flowerbrackets.com/java-program-check-whether-string-palindrome/

tachjava said...

Great blog!! Best java programs in one place. Thanks for sharing.

Cheers,
https://www.flowerbrackets.com/java-program-check-if-number-is-palindrome-or-not/

GNIITSOLUTION GNIIT SOLUTION. Powered by Blogger.

Translate

Blog Archive

Unordered List