File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Object creation doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Object creation doubt" Watch "Object creation doubt" New topic

Object creation doubt

siva mail

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?

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199


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:
subject: Object creation doubt
It's not a secret anymore!