Which of these is incorrect string literal in java?
String in Java is a?
Which of these methods of String class is used to obtain character at specified index in java?
Which of these methods of String class can be used to compare two strings based on their content in java?
Which of the following statements is incorrect about strings in java?
Which of these methods of class String is used to obtain length of a String object in java?
Which of these constructors is used to create an empty String object in java?
Which of these is an incorrect statement about strings in java?
In java, which of these methods is an alternative to getChars() that stores the characters in an array of bytes?
Which of these methods is used to compare a specific region inside a string with another specific region in another string in java?
In the below java code, which code fragment should be inserted at line 3 so that the output will be: “123abc 123abc”?
1 StringBuilder sb1 = new StringBuilder("123");
2 String s1 = "123";
3 // insert code here
4 System.out.println(sb1 + " " + s1);
Which of these method of class String is used to extract a substring from a String object in java?
Which of these method of class String is used to remove leading and trailing whitespaces in java?
What is the output of this java program?
class Output
{
public static void main(String args[])
{
long start, end;
start = System.currentTimeMillis();
for (int i = 0; i < 10000000; i++);
end = System.currentTimeMillis();
System.out.print(end - start);
}
}
How to format date from one form to another in java?
How to identify if a timezone is eligible for DayLight Saving in java?
How to get difference between two dates in java?
In java, which of these classes is used to create an object whose character sequence is mutable?
What is the string contained in s after following java code is executed?
StringBuffer s = new StringBuffer(“Hello”);
s.deleteCharAt(0);
What is the output of this java program?
class output
{
public static void main(String args[])
{
StringBuffer c = new StringBuffer("Hello");
c.delete(0,2);
System.out.println(c);
}
}