Consider the following Java code snippet: public class Main { public static…
PYQ IBPS SO CRP SPL-XIII (2023)
Consider the following Java code snippet:
public class Main
{
public static void main(String[] args)
{
String str = "2237\u3456\u7891" + "011";
int length = str.length();
System.out.println("Length of the string : " + length);
}
}
What will be the output of the program?
- A.
Length of the string : 19
- B.
Length of the string : 13
- C.
Length of the string : 17
- D.
Length of the string : 9
- E.
Compilation Error
Attempted by 107 students.
Sign up free to check your answer
Sign up freeLoading lesson…

