Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
What is string in java ?
- Is it a non premitive datatype?
- Is it a class ?
- Is it an object ?

What I have tried:

I searched in google
Somewhere it is given that it is non premitive data type.
Somewhere it is class....................
Posted
Updated 15-Aug-22 19:03pm

As shown in String (Java Platform SE 7 )[^]
String is a class.

A class is a template for objects.

If you create an instance of a class
e.g.
String myString = "abc"
this instance (myString) is an object.
 
Share this answer
 
v2
Every language as extensive documentation and tutorials online, please try and make use of them:
Java Tutorials Learning Paths[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900