in Education by
Which of this method of class StringBuffer is used to get the length of the sequence of characters? (a) length() (b) capacity() (c) Length() (d) Capacity() I have been asked this question by my college director while I was bunking the class. The origin of the question is StringBuffer Methods in portion String Handling of Java Select the correct answer from above options Java questions and answers, Java questions pdf, Java question bank, Java questions and answers pdf, mcq on Java pdf, Java questions and solutions, Java mcq Test , Interview Java questions, Java Questions for Interview, Java MCQ (Multiple Choice Questions),Core Java Questions, Core Java MCQ,core java interview questions for experiencedcore java interview questions for 3 years experience,java programming questions,core java interview questions for freshers,java interview questions and answers for freshers, java programming questions and answers pdf, java interview questions for beginners

1 Answer

0 votes
by
 
Best answer
The correct choice is (a) length() For explanation: length()- returns the length of String the StringBuffer would create whereas capacity() returns a total number of characters that can be supported before it is grown.

Related questions

0 votes
    Which of this method of class StringBuffer is used to reverse sequence of characters? (a) reverse() (b ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of this method of class String is used to obtain a length of String object? (a) get() (b ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these methods of class StringBuffer is used to extract a substring from a String object? (a) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these method of FileReader class is used to read characters from a file? (a) read() (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these class is superclass of String and StringBuffer class? (a) java.util (b) java.lang ( ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of this method of class String is used to extract a substring from a String object? (a) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these class is used to read characters in a file? (a) FileReader (b) FileWriter (c) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these method of httpd class is used to get report on each hit to HTTP server? (a) log( ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of this keyword must be used to inherit a class? (a) super (b) this (c) extent (d) ... java programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of this method is used to change an element in a LinkedList Object? (a) change() (b) set( ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these coding types is used for data type characters in Java? (a) ASCII (b) ISO-LATIN-1 ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Which of these occupy first 0 to 127 in Unicode character set used for characters in Java? (a) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    What would be the behaviour if this() and super() used in a method? (a) Runtime error (b) ... java programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which of these method of String class is used to obtain character at specified index? (a) char() ( ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which of these method of String class can be used to test to strings for equality? (a) isequal() ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
...