• 2021-04-14
    8.5 阅读程序,写出运行结果
    class Point{
    int x=1;
    static int y=2;
    public void show(){System.out.println(x+","+y); }}
    public class tempDemo{
    public static void main(String []args){
    Point p1=new Point();p1.show();
    p1.x=2;p1.y=3;
    Point p2=new Point();p2.show();
    p1.show();
    p1.y=5; p2.show();
    }}
  • 举一反三