Computer Science, asked by UniquePrincess1234, 9 months ago

When will you use instance variables and class variables in a class?​

Answers

Answered by Anonymous
2

Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block. Instance variables are created when an object is created with the use of the keyword 'new' and destroyed when the object is destroyed.

Similar questions