Computer Science, asked by rajeshmauryamau25, 11 months ago

What are the instance and class variables? ..​

Answers

Answered by sadhnavermalav
1

Answer:

Class variables are those variables which are assigned / declared inside the class but outside any method/function..

whereas instance variables are those which are declared and assinged a value inside a method/function of a class..

Explanation:

hope it helps.. please mark as brainliest

Answered by shanmukh51
1

\huge{\boxed{\boxed{\boxed{\boxed{\red{Ello \: mate}}}}}}

\huge{\pink{Answer}}

✓✓An instance variable is similar to a class variable. An instance variable is a variable which is declared in a class but outside the constructor and the method/function. Instance variables are created when an object is instantiated, and are accessible to all the methods, the constructor and block in the class.

&lt;marquee behaviour -move&gt;</p><p>&lt;font colour="red"&gt;&lt;h1&gt;hope it helps you&lt;/h1&gt;&lt;/marquee&gt;

Attachments:
Similar questions