Computer Applications
What will be the output of the following program snippet?
s1 = "COMPUTER";
s2 = "computer";
System.out.println(s1.equals(s2));
- True
- False
- 0
- 1
Related Questions
What will be the value stored in the variable 'c' if the following statement is executed?
c = "COMPUTER".charAt("COMPUTER ".indexOf('P'))- 3
- 4
- P
- M
Which of the following functions is used to remove leading and trailing white spaces from the string?
- trim( )
- trail( )
- truncate( )
- slice( )
What will be the output of the following program snippet?
str1 = "AMAN";
str2 = "AMIT";
System.out.println(str1.compareTo(str2));- 8
- 0
- -8
- 2
Which of the following packages contain string functions?
- java.awt
- java.string
- java.math
- java.lang