日期:2014-05-20 浏览次数:20744 次
class T
{
public class B
{
void message()
{
System.out.println("Hello World");
}
}
}
public class Test
{
public static void main(String [] args)
{
T obj = new T();
T.B obj2 = obj.new B();
obj2.message();
}
}
class T
{
public static class B
{
void message()
{
System.out.println("Hello World");
}
}
}
public class Test
{
public static void main(String [] args)
{
/* T obj = new T();
T.B obj2 = obj.new B();
obj2.message();*/
//该如何访问message??怎么写??
}
}
public static void main(String [] args)
{
T.B obj= new T.B();
obj.message();
}