You are on page 1of 6

#1 : Java Programming Interview Questions For Automation Testers With Answers

#2: How to count character Occurrence in a given String


#3 : How to find duplicate characters
#4 : How to check if two strings are ANAGRAM
#5: Find First Non Repeated character
#6: How to Reverse string
#7 : How to Extract last four character from string
#8 : How to check PALINDROME string using recursion
#9 : How to reverse sentence words
#10 : How to reverse each [every] word in sentence
#11 : How to find largest and smallest element in array
#12 : Find Missing Number In Array
#13 : How to find duplicates in array in java using brute force method
#14 : How to find duplicates in array in java using sorting
#15: How to find duplicates in array using HASHSET
#16 : How to find duplicates in array in java using HASHMAP
#17 : How to remove DUPLICATE words from a given sentence
#18 : How to reverse a number in java
#19: Fibonacci series
#20 : How to find Factorial in java
#21 : Factorial using recursion in java
#22 : How to print pyramid pattern java program
#23 : Pyramid pattern programs in java
#24 : How to manipulate Array in Java
1 Swap Two Numbers | 5 Ways of swapping Numbers
2 Reverse A Number | 3 Ways of Reverse a Number
3 Reverse A String | 3 Ways of Reverse a String
4 Palindrome Number | How to Check Given Number is Palindrome or Not
5 Palindrome String | How to Check Given String is Palindrome or Not
6 Count Number Of Digits in A Number
7 Count Number Of EVEN & ODD Digits in A Number
8 Count Sum Of Digits in a Number
9 Find Largest Of 3 Numbers | 2 Different Ways
10 Generate Fibonacci series
11 Check Given Number is Prime Or Not
12 How To Generate Random Numbers & Strings | Apache Commons API
13 Factorial of a Number
14 Find Sum of Elements in Array
15 Print Even & Odd Numbers from an Array
16 How To Check The Equality Of Two Arrays
17 Find Missing Number in an Array
18 How To Find Maximum & Minimum Values in Array
19 How To Find Duplicate Elements in Array
20 Searching an Element in Array | Linear Search
21 Searching an Element in Array | Binary Search
22 Sort Elements in Array | Bubble Sort
23 Sort Elements in Array Using Built-in Methods
24 How To Remove Junk or Special Characters in String
25 How To Remove White Spaces in a String
26 How To Count Occurrences of a Character in a String
27 How To Count Words in a String
28 How To Reverse Each Word in a String
29 How To Read Data From Text File
30 How To Write Data Into Text File
1. How to reverse a String in Java?
2. How to swap two numbers without using a third variable?
3. Java Program to check if a vowel is present in the string?
4. Java program to check if the given number is Prime?
5. Fibonacci Series using recursion
6. Check if a List of integers contains only odd numbers?
7. Palindrome Check
8. How to remove Whitespaces from String
9. How to remove leading and trailing whitespaces from a string?
10. Sorting an array in Java?
11. How to Create a Deadlock Scenario Programatically?
12. Find factorial of an integer?
13. Revese a Linked List?
14. How to implement Binary Search?
15. Merge Sort in Java?
16. Create a Pyramid of Characters in Java?
17. Check if two arrays contains same elements?
18. Sum of all elements in integer array?
19. Find second largest number in an array?
20. How to Shuffle an Array in Java?
21. How to find if a string is present in a text file?
22. How to print date in specific format?
23. How to merge two lists in java?
24. How to Sort HashMap by values?
25. remove all occurrences of a given character from input String?
26. How to get distinct characters and their count in a String?
27. How to prove String is immutable programatically?
28. Write a Program to showcase inheritance?
29. Write a Program to Show Diamond Problem with Multiple Inheritance?
30. Write a Program to show try catch example?
31. Write a code to show NullPointerException
32. How to Create a Record in Java?
33. How to create Text Blocks in Java?
34. Show example of switch expressions and multi-label case statements
35. How to Compile and Run a Java Class from Command Line?
36. How to create Enum in Java?
37. How to use forEach() method?
38. Write an interface with default and static method?
39. How do we create a Functional interface?
40. Show an example of using lambda expressions in Java
41. Show examples of overloading and overriding in Java
42-49. Guess the Output of Code Snippets
50. Find 5 mistakes in the following code snippet
may 8.5
june 1.5 10
july 1.5 11.5
august 1.5 13
september 1.5 14.5

90
14-Sep-22 75.5
75 28-Nov-22

You might also like