File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
instantiating a static object
Joined: May 16, 2006
Sep 19, 2007 02:56:00
I came across a code which is something like this..
A = new Test() where Test is a class. I am not able to understand the reason for using the static keyword here. I want to know what purpose it serves.
Thanks in advance.
Jesper de Jong
Joined: Aug 16, 2005
Sep 19, 2007 05:00:00
'static' means in this case that the variable A is a static member variable.
The Java Tutorial - Understanding Instance and Class Members
[ September 19, 2007: Message edited by: Jesper Young ]
Java Beginners FAQ
JavaRanch SCJP FAQ
The Java Tutorial
Java SE 7 API documentation
- My blog about Scala
I agree. Here's the link:
subject: instantiating a static object
can't call another constructor from no-arg constructor
cofused about output of program..?
Object of Class N declared inside Class N itself.
Kathy / Bert static final variables
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014