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.

Single Choice
Views 90

Answer:

  1. a, b
  2. x, y

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.