What is Printed?

What is being printed for this code?

 class Alpha {

 public void print() { System.out.print("Alpha "); }

  }

  public class Beta extends Alpha {

 public void print() { System.out.print("Beta"); }

 public static void main(String[] args) {

     Alpha a = new Beta();

     Beta b = (Beta)a;

     a.print();

     b.print();

 }

  }
×

Problem Loading...

Note Loading...

Set Loading...