Examveda
Examveda

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


This Question Belongs to Java Program >> Strings

Join The Discussion

Comments ( 4 )

  1. Vasundhra Chib
    Vasundhra Chib :
    6 years ago

    what 11 constructors?? can someone explain?

  2. Mounika Jayakumar
    Mounika Jayakumar :
    6 years ago

    Which are those 11 constructors

  3. Sahil Sharma
    Sahil Sharma :
    8 years ago


    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);
    }

  4. Sahil Sharma
    Sahil Sharma :
    8 years ago

    16 constructors niggas

Related Questions on Strings