This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Object creation doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Object creation doubt" Watch "Object creation doubt" New topic
Author

Object creation doubt

siva mail
Greenhorn

Joined: Jan 25, 2009
Posts: 19
Hi ,

If iam useing static fields of one class in another class . In this case Object will create for the class where iam accessing the static fields?


thanks
Siva
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24081
    
  15

Hi,

If I understand your question correctly, the answer is "no", using the static fields of a class won't, in general, cause any instances of that class to be created -- unless the class is specifically designed to create one or more instances when it is loaded.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Object creation doubt
 
Similar Threads
Static
finalize()
please help me on how to serialise static variables, if possible
Static Vs non-static methods
Serialization