Computer Science, asked by demogaming36, 13 hours ago

Which option is wrong to call m1() & m2() methods in main() method in the following

program?

class Test
{
void m1()
{
System.out.println(“m1 Method”);
}
static void m2()
{
System.out.println(“m2 Method”);
}
public static void main(String []args)
{
}
}


a. Test t = new Test(); t.m1(); Test.m2();

b. Test t = new Test(); m1(); Test.m2();

c. Test t = new Test(); t.m1(); t.m2();

d. Test t = new Test(); t.m1(); m2();​

Answers

Answered by jainayush9131
0

Answer:

all are. wrong according to me

Similar questions