What is String in java? And why is it use in java?
sushants
-5
Light Poster
Ezzaral
commented:
You are just a font of useless, lazy questions, aren't you?
-3
Recommended Answers
Jump to PostString is a datatype.
for more information, I would suggest you take a look at this and go over your textbook/course notes again. it's a very basic datatype, used in every application I've …
Jump to Posta String may look like an array of chars, but it isn't. don't get fooled by looks.
Jump to PostChar doesn't exist.
char is a primitive type, Character is it's wrapper class.
if a String was an array of chars, do you really think that the String class would provide this method?
Jump to PostTo be fair, the Java 7 source code for String begins
public final class String implements java.io.Serializable, Comparable<String>, CharSequence { /** The value is used for character storage. */ private final char value[]; ...
so you could reasonably say that a String is an array of …
All 14 Replies
stultuske
1,116
Posting Maven
Featured Poster
IIM
commented:
+1 for link
+8
IIM
163
Master Poster
poopuh
0
Light Poster
stultuske
1,116
Posting Maven
Featured Poster
poopuh
0
Light Poster
stultuske
1,116
Posting Maven
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
nadim123
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
joy gandhi
0
Newbie Poster
stultuske
1,116
Posting Maven
Featured Poster
poopuh
0
Light Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.