Advertisements
Advertisements
प्रश्न
Consider the following class:
public class MyClass
{
public static int x - 3, y = 4;
public int a = 2, b = 3;
}
- Name the variables for which each object of the class will have its own distinct copy.
- Name the variables that are common to all objects of the class.
लघु उत्तर
उत्तर
- The variables for which each object of the class will have its own distinct copy are a and b.
- The variables that are common to all the objects of the class are x and y.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?