Forums Register Login

default String

+Pie Number of slices to send: Send
Hi,
I'm have a few questions. Could somebody help me out?
is String a class?
will the default String field be empty string("") if the String field has not been initialized?

thanks

Sura
+Pie Number of slices to send: Send
Hi Sura,

Yeah String is a class........And about the other question why don't you try and write a small code and get it run....

String n;
String x = new String("");

Such codes will help you.....Any small doubts can be clarified by writing programs....Many of our peers have suggested this. This will help you to learn more definitely.

Still if you face problems then come up with post.....okay....Have good time with Strings....
+Pie Number of slices to send: Send
You have read the String API?

String s; defines a reference to an instance of the String class.

Except for local variables the default value of object references is null.

The use of the constructor String() (with no arguments) will cause an empty string ("") to be created.
bacon. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 589 times.
Similar Threads
Answers of Sun's Free Proficiency Assessment
Question about @Resource annotation
Please Help, need clarification about K&B book Self-Test Questions
JSF validation errors
EntityBean and default value of a not null field
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:18:33.