This document contains 25 questions about Java String interview questions. Some of the key topics covered include the main String classes in Java, their properties and features, how to perform operations like concatenation, conversion, comparison, trimming and replacing characters. It also discusses concepts like the string pool, substring selection, splitting, converting variables to strings, finding characters by index and comparing String and StringBuffer objects.
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
19 views
Java String Study Material
This document contains 25 questions about Java String interview questions. Some of the key topics covered include the main String classes in Java, their properties and features, how to perform operations like concatenation, conversion, comparison, trimming and replacing characters. It also discusses concepts like the string pool, substring selection, splitting, converting variables to strings, finding characters by index and comparing String and StringBuffer objects.
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1
Java String Interview Questions
1. What �string� classes do you know?
2. What are the main properties of �string� classes (their features)? 3. Is it possible to inherit a string type, why? 4. Define the concept of string concatenation. 5. How to convert a string to a number? 6. How to compare the value of two lines? 7. How to flip a string? 8. How does the comparison of two lines work? 9. How to trim spaces at the end of a line? 10. How to replace a character in a string? 11. How to get part of the line? 12. Define the concept of �string pool�. 13. What method allows you to select a substring in a string? 14. How to split a string into substrings for a given delimiter? 15. What method is called to convert a variable to a string? 16. How to know the value of a specific character of a string, knowing its ordinal number in a string? 17. How to find the required character in the string? 18. Is it possible to synchronize access to the string? 19. What does the intern () method do? 20. What is the difference and what does the String, StringBuffer and StringBuilder classes have in common? 21. How to compare the string values ??of two different objects of type String and StringBuffer? 22. Why is the string unchanged and finalized in Java? 23. Why an array of characters is preferable to the string to store the password? 24. Why is string a popular key in a HashMap in Java? 25. Write a method to remove this character from the string.