Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
Doubt about using 'null'
surendar prabu
Ranch Hand
Posts: 102
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What is the difference in behaviour of null when used on
String
s1=null;
and
MyObject myo=null;
regards
Surendarprabu
SCJP 1.4
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
No idea what you're asking. "null" means "no object", and it can be assigned to a variable of any reference type. String is no different from any other class in this respect or in virtually any other respect.
[Jess in Action]
[AskingGoodQuestions]
Svend Rost
Ranch Hand
Posts: 904
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
There's no difference.
Do you see different behaviour in your code when your setting a String
object and a MyObj object to null ?
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
few doubts
doubt??
Doubt about "static" behaviour
Doubt in arrays
Object in a loop scope
More...