The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Instance variable & static 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)
Reply Bookmark "Instance variable & static " Watch "Instance variable & static " New topic
Author

Instance variable & static

Rahul Ravindran
Greenhorn

Joined: Sep 03, 2012
Posts: 3



Is a class variable same as the instance variable marked static .
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 3791
    
    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

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
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??