Day 5: Practice programs Java

Day 5: Practice programs Java

50 Programs that you can practice to better your programming skills


Here are 50 Java programs that are useful for anyone who wants to develop their programming skill:

  1. Write a program to reverse a string in Java.
  2. Write a program to find the second largest number in an array.
  3. Write a program to find the factorial of a given number.
  4. Write a program to check if a given string is a palindrome or not.
  5. Write a program to find the sum of the digits of a given number.
  6. Write a program to find the Fibonacci series up to a given number.
  7. Write a program to sort an array in ascending order.
  8. Write a program to find the maximum and minimum values in an array.
  9. Write a program to remove duplicates from an array.
  10. Write a program to find the number of occurrences of a given character in a string.
  11. Write a program to check if a given number is prime or not.
  12. Write a program to find the GCD of two given numbers.
  13. Write a program to find the LCM of two given numbers.
  14. Write a program to find the roots of a quadratic equation.
  15. Write a program to find the sum of all the prime numbers up to a given number.
  16. Write a program to implement the binary search algorithm.
  17. Write a program to implement the bubble sort algorithm.
  18. Write a program to implement the selection sort algorithm.
  19. Write a program to implement the insertion sort algorithm.
  20. Write a program to implement the merge sort algorithm.
  21. Write a program to implement the quick sort algorithm.
  22. Write a program to implement a stack using an array.
  23. Write a program to implement a queue using an array.
  24. Write a program to implement a linked list.
  25. Write a program to implement a doubly linked list.
  26. Write a program to implement a circular linked list.
  27. Write a program to implement a binary tree.
  28. Write a program to implement a binary search tree.
  29. Write a program to implement an AVL tree.
  30. Write a program to implement a hash table.
  31. Write a program to implement the depth-first search algorithm.
  32. Write a program to implement the breadth-first search algorithm.
  33. Write a program to implement Dijkstra's algorithm.
  34. Write a program to implement the Bellman-Ford algorithm.
  35. Write a program to implement the Floyd-Warshall algorithm.
  36. Write a program to implement the Kruskal's algorithm.
  37. Write a program to implement the Prim's algorithm.
  38. Write a program to implement the Huffman coding algorithm.
  39. Write a program to implement the RSA encryption algorithm.
  40. Write a program to implement the AES encryption algorithm.
  41. Write a program to implement the SHA-256 hashing algorithm.
  42. Write a program to implement the MD5 hashing algorithm.
  43. Write a program to implement the base64 encoding algorithm.
  44. Write a program to implement the binary to decimal conversion.
  45. Write a program to implement the decimal to binary conversion.
  46. Write a program to implement the bubble sort algorithm using multithreading.
  47. Write a program to implement the merge sort algorithm using recursion.
  48. Write a program to implement the decorator design pattern.
  49. Write a program to implement the factory design pattern.
  50. Write a program to implement the observer design pattern.

These programs cover a wide range of topics and can help you to prepare for Java interviews in product companies.




The below concepts apart from these above programs can establish someone as an Automation developer in a project

  1. Implement a program to demonstrate encapsulation in Java.
  2. Write a program to show how inheritance works in Java.
  3. Create a program to demonstrate how to achieve method overriding in Java.
  4. Implement a program to demonstrate how to achieve method overloading in Java.
  5. Write a program to show how to create an abstract class in Java.
  6. Implement a program to demonstrate how to create an interface in Java.
  7. Create a program to show how to achieve polymorphism in Java.
  8. Write a program to demonstrate how to create a singleton class in Java.
  9. Implement a program to demonstrate how to use the static keyword in Java.
  10. Create a program to show how to implement exception handling in Java.
  11. Write a program to show how to create a thread in Java.
  12. Implement a program to demonstrate how to use synchronization in Java.
  13. Create a program to show how to use the final keyword in Java.
  14. Write a program to demonstrate how to use the volatile keyword in Java.
  15. Implement a program to demonstrate how to use the transient keyword in Java.
  16. Create a program to show how to use the synchronized keyword in Java.
  17. Write a program to demonstrate how to use the extends keyword in Java.
  18. Implement a program to demonstrate how to use the implements keyword in Java.
  19. Create a program to show how to use the super keyword in Java.
  20. Write a program to demonstrate how to use the this keyword in Java.
  21. Implement a program to demonstrate how to use the abstract keyword in Java.
  22. Create a program to show how to use the interface keyword in Java.
  23. Write a program to demonstrate how to use the new keyword in Java.
  24. Implement a program to demonstrate how to use the instanceof keyword in Java.
  25. Create a program to show how to use the package keyword in Java.
  26. Write a program to demonstrate how to use the import keyword in Java.
  27. Implement a program to demonstrate how to use the throw keyword in Java.
  28. Create a program to show how to use the throws keyword in Java.
  29. Write a program to demonstrate how to use the try-catch block in Java.
  30. Implement a program to demonstrate how to use the final keyword in Java.
  31. Create a program to show how to use the static keyword in Java.
  32. Write a program to demonstrate how to use the synchronized keyword in Java.
  33. Implement a program to demonstrate how to use the transient keyword in Java.
  34. Create a program to show how to use the volatile keyword in Java.
  35. Write a program to demonstrate how to use the finalizer method in Java.
  36. Implement a program to demonstrate how to use the clone method in Java.
  37. Create a program to show how to use the equals method in Java.
  38. Write a program to demonstrate how to use the toString method in Java.
  39. Implement a program to demonstrate how to use the getClass method in Java.
  40. Create a program to show how to use the wait method in Java.
  41. Write a program to demonstrate how to use the notify method in Java.
  42. Implement a program to demonstrate how to use the notifyAll method in Java.
  43. Create a program to show how to use the Math class in Java.
  44. Write a program to demonstrate how to use the Scanner class in Java.
  45. Implement a program to demonstrate how to use the StringTokenizer class in Java.
  46. Create a program to show how to use the StringBuffer class in Java.
  47. Write a program to demonstrate how to use the StringBuilder





Harivenkatesh S J

Quality Assurance Engineer at Oracle

1 年

I think that there is a typo in your Hashtag. you have added extra zero in #30daysofSeleniumJava so that it shows #300daysofSeleniumJava . However #300daysofSeleniumJava is also fine and will help us to revisit/learn selenium concepts for 300 days??Shree Krishna Priya J

要查看或添加评论,请登录

Shree Krishna Priya J的更多文章

社区洞察

其他会员也浏览了