A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Certification
»
Programmer Certification (SCJP/OCPJP)
Author
Instance variable & static
Rahul Ravindran
Greenhorn
Joined: Sep 03, 2012
Posts: 3
posted
Sep 03, 2012 05:20:29
0
Is a class variable same as the instance variable marked static .
Matthew Brown
Bartender
Joined: Apr 06, 2010
Posts: 3791
1
I like...
posted
Sep 03, 2012 05:26:39
1
Hi Rahul. Welcome to the Ranch!
Almost. "Instance variable marked static" is actually a contradiction, because if it's marked static it
isn't
an instance variable (because it doesn't belong to instances of the class). But yes, a class variable is a static variable.
R. Jain
Ranch Hand
Joined: Aug 11, 2012
Posts: 276
I like...
posted
Sep 03, 2012 05:30:35
0
Rahul Ravindran wrote:
Is a class variable same as the instance variable marked static .
Yes
OCPJP
Rahul Ravindran
Greenhorn
Joined: Sep 03, 2012
Posts: 3
posted
Sep 03, 2012 05:33:30
0
Thank you mr mathew .
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Instance variable & static
Similar Threads
Difference between Static and Instance variable
textbook page 217 error (from the classroom)
Best Practice for getters and setters
Pl explain this a bit diff code
why a transient variable can be declared with static modifier??
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter