Choose the correct option based on this program:
class base1 {// w ww .ja v a 2s . co m protected int var; } interface base2 { int var = 0; // #1 } class Main extends base1 implements base2 { // #2 public static void main(String args[]) { System.out.println("var:" + var); // #3 } }
c)
Statements marked with the comment #1 and #2 will not result in any compiler errors; only access to the variable var will generate a compiler error since the access is ambiguous (since the variable is declared in both base1 and base2).