Javatpoint Logo

Instance variable

By: buntyg*** On: Sun Jan 08 11:58:17 IST 2017     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
"A variable which is declared inside the class but outside the method, is called instance variable . It is not declared as static."

sir ,
i am able to declared a Instance variable as static.but your website says that it is impossible.

Up0Down

 
two types of Variable Instance and Static

If You declare variable as Static ie Using Static key word..
you can access that by object reference and From using Class Name..
But it is good practice to use static Variable Using Class Name..
Image Created0Down

By: [email protected] On: Thu Jan 12 11:27:21 IST 2017 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No