Question: Suppose that class A is defined by the following code. Let a be an instance of A . Which of the statements are correct inside
Suppose that class A is defined by the following code. Let a be an instance of A Which of the statements are correct inside the main method?
public class A
int num;
static String str;
void numMethod
static void strMethod
public static void mainString args
A a new A;
anumMethod;
System.out.printlnanum;
System.out.printlnAstr;
System.out.printlnastr;
System.out.printlnAnum;
astrMethod;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
