• 2021-04-14
    对于下列Tom类,哪个叙述是正确的
    public class Test {
    public static void main(String args[]){
    Tom cat1 = new Tom();
    Tom cat2 = new Tom(100);
    }
    }
    class Tom {
    void Tom{ System.out.print("hello"); }
    Tom(int n){ System.out.print(n); }
    }
  • 举一反三