1. Reverse a String:
Write a Java program to reverse a given string.
2. Find the Largest Element in an Array:
Find and print the largest element in an array.
3. Check for Palindrome:
Determine if a given string is a palindrome (reads the same backward as forward).
4. Factorial Calculation:
Write a function to calculate the factorial of a number.
5. Fibonacci Series:
Generate the first n numbers in the Fibonacci sequence.
6. Check for Prime Number:
Write a program to check if a given number is prime.
7. String Anagrams:
Determine if two strings are anagrams of each other.
8. Array Sorting:
Implement sorting algorithms like bubble sort, merge sort, or quicksort.
9. Binary Search:
Implement a binary search algorithm to find an element in a sorted array.
10. Duplicate Elements in an Array:
Find and print duplicate elements in an array.
11. Linked List Reversal:
Reverse a singly-linked list.
12. Matrix Operations:
Perform matrix operations like addition, multiplication, or transpose.
13. Implement a Stack:
Create a stack data structure and implement basic operations (push, pop).
14. Implement a Queue:
Create a queue data structure and implement basic operations (enqueue, dequeue).
15. Inheritance and Polymorphism:
Implement a class hierarchy with inheritance and demonstrate polymorphism.
16. Exception Handling:
Write code that demonstrates the use of try-catch blocks to handle exceptions.
17. File I/O:
Read from and write to a file using Java's file I/O capabilities.
18. Multithreading:
Create a simple multi threaded program and demonstrate thread synchronization.
19. Lambda Expressions:
Use lambda expressions to implement functional interfaces.
20. Recursive Algorithms:
Solve a problem using recursion, such as computing the factorial or Fibonacci sequence.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.