How many techniques can be employed to create a String Object?

devquora
devquora

Posted On: Feb 22, 2018

 

As strings are objects so strings can obviously be made utilizing new administrator. String class has in excess 10 constructors to make various Strings which ranges from accepting nothing as a parameter to taking char exhibit, StringBuilder, another String as contention and StringBuffer. Another and increasingly favored approach to making Strings is to relegate String exacting legitimately to a String reference as you will accomplish for any crude type. For each string, a strict Java will consequently build a String object. For instance - String str = "abc";

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Java String Interview Questions

    What do you understand by the term String with respect to Java?

    With respect to Java, a String can be attributed internally by a variety of byte esteems..

    Java String Interview Questions

    Describe String intern() methodology

    As indicated by Oracle records, when the intern methodology..