answersLogoWhite

0

String is a pre-defined class in Java. For example:

String s = new String("This is a string");

the variable s is now a String object since it was declared and initialized in the String class.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is string buffer in java?

StringBuffer is java class available in java.lang package which provides mutable String object where String is immutable class. The methods of this class like reverse(), append(),insert() gives facility to insert data of the same object.


What is a string in java?

An object that stores an ordered set of characters (ie. "hello"). The String class represents character strings.


In Java what operator is used to determine if an object is of a particular class type?

The instanceof keyword is used to determine if an object is of a particular class type.Example:Object obj = new String();if(obj instanceof String) {System.out.println("obj is a String!");}


What is the Object class parent?

Object is the topmost class in the Java Class hierarchy. There is no Class above Object. All classes in Java are implicitly derived from Object.


How can you make object from string in java?

String itself is an object dude... If you want an object out of a string then you can do this. Object obj = (Object) str; //str is the String you want to convert to object.


What is string class features in java?

String class is useful to accept inputs from commands prompt as string arguments


Is there class name as object in java?

Yes, the base class for all other Java classes is Object.


What is object class in java?

object class is a super class for all other class...


What does the java new operator do?

The new keyword tells Java that you want to create a new instance of a class by invoking one of the constructors for that class.// Create a new, empty String objectString s1 = new String();// Create a new String object with a different constructorString s2 = new String("howdy");


What is topleval class in java?

The top level class in Java is "Object." All other classes are subclasses of Object by default.


What are the different between'a' and ''a in java string methods?

The difference between 'a' and "a" anywhere in Java is that 'a' is a primitive char type, while "a" is a String object.


Which built in class in java contains only final methods?

String class