Professional Documents
Culture Documents
Ajava QB Ia1
Ajava QB Ia1
Module 2
1. What is String in Java? Write a JAVA program that demonstrates any four string
constructors of String class (8)
2. Differentiate equals() and == for string comparison. (4)
3. Explain the StringBuffer class with examples capacity, reverse, charAt, deleteCharAt.
(8)
4. How does compareTo() method differs from compareToIgnoreCase(). (4)
5. Explain how to check the occurrence of a substring. (5M)
6. Explain any two character handling methods. (4M)
7. Write a JAVA program to sort the names using bubblesort. (6M)
8. Explain the String Comparison methods with suitable programs. (8M)
9. Explain indexOf() and lastIndexOf() methods with example. (4M)
10. What is toString()? Write a program to override toString() and provide your own
string representation. (8M)
11. Explain special string operations with example. (6M)
12. Write a JAVA program to replace all the matching substring within a given string.
(6M)