I am working with this question and it seems that there is a mistake.
Which of the given options if put at //1 will correctly instantiate objects of various classes defined in the following code?
Code: Select all
public class TestClass
{
public class A
{
}
public static class B
{
}
public void useclasses()
{
//1
}
}
new TestClass.A();
My JVM says it is wrong. Can you tell me what is wrong?