Java Programs


  1. Write java program to reverse of given number
  2. Write java program to check given number is prime number or not
  3. Write java program to check whether given number is perfect or not
  4. Write java program to check whether given number is palindrome or not
  5. Write java program to find factorial of given number
  6. Write java program to find given number is armstrong number or not.
  7. Write a JAVA program to check weather a char exist within string or not. example :- str1="hello" str2="e" output :- Your search string is Found at 2 place.
  8. Write a java program to accept n names of cites from user and display them in descending order.
  9. Write a java program to accept a string and convert each char from upper to lower and lower to upper. Example => i/p -> WELcome o/p -> welCOME
  10. Write a program to accept a string and replace all occurrence of char by another string. Example => i/p s1 => welcome search =>e replace => ZZ o/p => wZZlcomZZ
  11. Write a java program to create strings in 2 half and display reverse of each half. Example => welcome -> wel come o/p -- lewemoc
  12. Write a java program to accept filename and display it's content (byte by byte) using FileInputStream class.
  13. Write a java program to accept a filename and copy content of one to another while copying only copy the alternate word.
  14. Write a java program to merge the content of file(2 source 1 destination)
  15. Write a java program to reverse the content of file using RandomAccessFile
  16. Design a simple calculator using Applet in java.
  17. Write a Java program which will create a frame if we try to close it, it should change it’s color and it remains visible on the screen(Use swing).
  18. Write a java program to read the characters from a file, if a character is alphabet then reverse its case, if not then display its category on the Screen. (whether it is Digit or Space)
  19. Write a java program to generate Fibonacci series.