-
What is the output of this program?
public class output
{
public static void main(String args[])
{
StringBuffer c = new StringBuffer("InterviewMania");
System.out.println(c.length());
}
}
-
- 11
- 12
- 13
- 14
- 15
Correct Option: D
length() method is used to obtain length of StringBuffer object, length of “InterviewMania” is 14.