public class A 

    B b1; 
    B b2=new B(); 
    public static void main(String args[]) 
    { 
      A a1=new A(); 
      System.out.println(a1.b1.x);  //这一行出错了
      System.out.println(a1.b2.x);
    } 
} class B 

    int x=10; 
} 请问对象作为成员必须要new一个空间吗?为什么会出现这样的错误。