Sunday, June 11, 2017

25 String Coding Interview Questions in java?

1) Write a java program to print duplicate characters from String?

2) Write a java program to check two strings are anagrams or not?

3) Write a java program to count the number of words in a string?

4) Write a java program to count the total number of occurrences of a given character in a string without using any loop?


5) Write a java program to reverse a string?

6) Write a java program to remove all white spaces from a string?

7) Write a java program to print first non repeated character from String?

8) How to reverse String in Java using Iteration and Recursion?

9)  How to check if a String contains only digits? 

10) Write a java program to reverse a given string with preserving the position of spaces?

12) Write a java program to reverse each word of a given string?

13) How to count number of vowels and consonants in a String?

14) How do you convert string to integer and integer to string in java?

15) Write a java program to find all permutations of a string?

16) How to find all permutations of String?

17)  How to check if String is Palindrome?

18)  How to remove duplicate characters from String?

19) Write a java program to append a given string to a text file?

20) Write a program to check if a String contains another String

21) Write a program to remove a given characters from String?

22) How to sort String  in Java?

23) How do you find the most repeated word in a text file in java?

24) How do you find first repeated and non-repeated character in the given string in java?

25)  Write a java program to find number of characters, number of words and number of lines in a text file?









No comments:

Post a Comment

Popular Posts