1.
Write a java program to Count the number of occurrences of any particular character in
the given input string.
2. Given a number, check if it is a perfect square or not using java code.
3. Write a Java Program to locate the middle element of an integer array and then traverse
and updates the elements of the array. The array must be updated to show the traversed
order of the elements. The traversal starts from the middle element, then visit its
immediate left element followed by the immediate right element of the middle element
and then go back to the middle element. This process is repeated starting from the middle
element and in every iteration jumping to the next subsequent elements on each of the
two sides of the middle element. The iteration ends at the last element of the array.
4. Write a Java Program to print the kth largest element in the array
5. Write a Java Program to rotate an array of n elements to the right by k steps.
6. Write a java program to read an array of integers which has both positive and negative
values and no “0” (zero) value. The program should return the number of distinct values
for each of which the sum of their positive and negative instances comes out to be zero.
7. Write a java program to print a Fibonacci series
8. Write a Java program to check whether a number is an Automorphic number or not.
9. Write a Java program to check if the given strings are an anagram of each other.
10. Find the sum of digits of a number until sum becomes single digit
11. Write a Java Program to find two elements in the Array such that difference between
them is largest.
12. Write a java program to write a function that is passed four integer inputs representing
two different time periods (each expressed as a number of minutes and seconds). The
function should calculate and return the differences between those two time periods
expressed in hours.
13. Given a positive integer N. Find the total count of set bits for all positive integers from 1
to N (both inclusive). For negative integer the output must be zero.
14. Write a java program to reverse a string and check if it is palindrome or not
15. Write a Java program to find the total number of characters, number and percentage of
uppercase letters, lowercase letters, digits and other symbols.
16. Write a Java Program that reads an array of integers and outputs the maximum product of
two adjacent elements in the given array of numbers.
17. Write a Java Program to iterate Array List using for-loop, while-loop, and advance for-
loop.
18. Write a Java Program to demonstrate an explicit wait condition check.
19. Write a Java Program to demonstrate Scroll up/ Scroll down.
20. Write a java program to Print Pyramid Pattern in Java?
21. Write a Java Program to convert Number to Word
22. Write a java program to Find Largest of Three Numbers
23. Write a java Program to copy all elements of one array into another array
24. Write A Java Program to determine whether two matrices are equal
25. Write a Java Program to replace lower-case characters with upper-case and vice-versa
26. Write a Java Program to Check if a Number is Positive or Negative
27. Write a Java Program to print the duplicate elements of an array
28. Write a Java Program to Find Smallest Number in an array
29. Write a Java Program to find the sum of each row and each column of a matrix
30. Write a Java Program to Find GCD of Two Numbers