Что произойдет при компиляции и запуске данного кода?

abstract public class Parent {
    String s = "hello!";
    public void test() {
        System.out.println(s);
    }
}

class P {
    public static void main(String[] args) {
        Parent p = new Parent();
        p.test();
    }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes