ClassOne.java package com.abc.pkg1; public class ClassOne { private char var = ‘a‘; char getVar() {return var;} } ClassTest.java package com.abc.pkg2; import com.abc.pkg1.ClassOne; public class ClassTest extends ClassOne { public static void main(Stringargs) { char a = new ClassOne().getVar(); char b = new ClassTest().getVar(); } } What is the result?()
A. Compilation will fail. B. Compilation succeeds and no exceptions are thrown. C. Compilation succeeds but an exception is thrown at line 5 in ClassTest.java. D. Compilation succeeds but an exception is thrown at line 6 in ClassTest.java.