package reflection;
class Car
{
String brand;
int price;
class Engine{
Engine()
{
}
private int weight;
void start(){
System.out.println("启动马达");
}
void stop(){
System.out.println("马达关闭");
}
}
}
public class InnerClassDemo {
public static void main(String[] args) {
Class car = Car.class;
}
}
|