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
Spring in Action
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 8 API documentation
I agree. Here's the link:
subject: instantiating a static object
cofused about output of program..?
Kathy / Bert static final variables
can't call another constructor from no-arg constructor
Object of Class N declared inside Class N itself.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014