How many Constructor String class have?
A. 2
B. 7
C. 13
D. 11
E. None of this
Answer: Option C
Solution(By Examveda Team)
The String class has over 60 methods and 13 constructors.Source : oracle.com
Join The Discussion
Comments ( 4 )
Related Questions on Strings
In Java, which class is used to represent a sequence of characters as a string?
A. String
B. StringBuilder
C. StringSequence
D. StringArray
What is the correct way to create a new empty String object in Java?
A. String emptyString = "";
B. String emptyString = new String();
C. String emptyString = " ";
D. String emptyString = null;
E. Both A and B
Which of the following methods is used to compare two strings for equality in Java?
A. equals()
B. compareTo()
C. equalsIgnoreCase()
D. compare()
what 11 constructors?? can someone explain?
Which are those 11 constructors
public static void main (String[] args)throws ClassNotFoundException{
Class c=Class.forName("java.lang.String");
Constructor[] cd=c.getDeclaredConstructors();
for(Constructor c2:cd )
{
++c1;
}
System.out.println(c1);
}
16 constructors niggas