Select correct lines

Report a typo

You are given two classes:

  • org.demo.A
  • org.demo.B
class A {
    
    private A() { }
    
    void invokeB() { 
        B objB = new B(); // (1)
        int b = objB.b;   // (2)
        int c = objB.c;   // (3)
    }
}

class B {

    protected int b;
    private int c;
    
    public void invokeA() {
        A objA = new A(); // (4)
    }
}

Select all correct lines.

Select one or more options from the list
___

Create a free account to access the full topic