0 votes
in JAVA by
What is String in Java? String is a data type?

1 Answer

0 votes
by
String is a Class in java and defined in java.lang package. It’s not a primitive data type like int and long. String class represents character Strings. String is used in almost all the Java applications and there are some interesting facts we should know about String. String in immutable and final in Java and JVM uses String Pool to store all the String objects.
Some other interesting things about String is the way we can instantiate a String object using double quotes and overloading of “+” operator for concatenation.

Related questions

+1 vote
asked Mar 16, 2021 in JAVA by Robindeniel
+1 vote
asked Mar 16, 2021 in JAVA by Robindeniel
...