package com.aaron.lang;
class A{
static{
System.out.print("1");
}
public A(){
System.out.print("2");
}
}
class B extends A{
static{
System.out.print("a");
}
public B(){
System.out.print("b");
}
}
class C {
public C(){
System.out.println("This is C");
}
protected void hello(Object o){
System.out.println("Hello A-o");
}
}
class D extends C{
protected void hello(Object o){
System.out.println("Hello B-o");
}
protected void hello(String o){
System.out.println("Hello S-O");
}
}
public class Hello{
public static void main(String[] ars){
//B ab = new B(); // 1a2b
//ab = new B();
String x="ABC";
//D d=new D();
//d.hello(x);
C c=new D();
c.hello(x);
try{
System.out.println("RED");
throw new Exception();
}catch(Exception e){
System.out.println("Yellow");
}finally{
System.out.println("Blue");
}
}
}