Computer Applications
Which of the following packages contain string functions?
- java.awt
- java.string
- java.math
- java.lang
Java String Handling
25 Likes
Answer
java.lang
Reason — Java Class Library contains a class called String which is available under java.lang package.
Answered By
13 Likes
Related Questions
What will be the output of the following program snippet?
s1 = "COMPUTER";
s2 = "computer";
System.out.println(s1.equals(s2));- True
- False
- 0
- 1
What will be the output of the following program snippet?
str1 = "AMAN";
str2 = "AMIT";
System.out.println(str1.compareTo(str2));- 8
- 0
- -8
- 2
Fill in the blanks:
_________ method is used to join two strings.
Fill in the blanks:
The output of the following statement, when executed:
System.out.println("COMPUTER".charAt(4)); is _________