whats string ?

Answer Posted / jayapala.pm

String is a collection of characters.
- In JAVA String is a wrapper class,String object can hold
the collection of characters.
- wrapper class is wrap the primitive value with in the
constructor is called wrapper classes.
- Strings are immutable in JAVA(we can't modify the string
object after initialize the value to object)
- String str = "greatJP"; we can assign value directly.This
option only for String class.
- Normally we will declare String str = new
String("GreatJP");

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between final and effectively final ?

637


What is difference between overloading and overriding in java?

529


What is the constructor?

581


What is multiple inheritance? Is it supported by java?

528


Can a serialized object be transferred via network?

515






What is the primitive type byte?

583


When should I use singleton?

519


What is a values collection view ?

685


What are the parts of a method?

536


Is it possible for a yielded thread to get chance for its execution again?

511


Can we override the private methods?

523


What is struts in java?

577


What are the different types of sorting in java?

539


What is a buffer in java?

573


What are methods?

552