• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Instance variable & static

 
Rahul Ravindran
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Is a class variable same as the instance variable marked static .
 
Matthew Brown
Bartender
Posts: 4567
8
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 375
1
Java Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahul Ravindran wrote:


Is a class variable same as the instance variable marked static .

Yes
 
Rahul Ravindran
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you mr mathew .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic