Home / Questions / 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.
Explanatory Question

Consider the following class:

public class myClass {
public static int x=3, y=4;
public int a=2, b=3;}
  1. Name the variables for which each object of the class will have its own distinct copy.
  2. Name the variables that are common to all objects of the class.

👁 95 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

  1. a, b
  2. x, y