Computer Science, asked by aadyadixit1, 4 months ago

In the program given below, state the name and value of the

following after executing the main( ) : (3x2=6)

i) class variable

ii) local variable

iii) instance variable.

class xyz

{

static int a = 7;

int b = 2;

public static void main( )

{

xyz obj = new xyz( );

System.out.println(a);

obj. sampleMethod(5);

int x = 6;

System.out.println(2);



}

void sampleMethod(int num)

{

System.out.println(num);

System.out.println(b)}
}
}​

Answers

Answered by mak94
1

Answer:

isme questions konsa he aap number wise likhiye

Similar questions