Is String a data type in java?
String is not a primitive data type in java. When a string is created in java, it’s actually an object of Java.Lang.String class that gets created. After creation of this string object, all built-in methods of String class can be used on the string object.
|
In Java Language Strings can be initialized by enclosing a string value in double quotes. Strings can be concatenated using the plus ('+') operator. So is String considered a Java data type? Inspite of all the above, String is not considered a primitive data type in Java.
|
All times are GMT -7. The time now is 08:04 AM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.