• 2022-07-23
    假定以下程序代码都分别放在MyClass.java文件中,哪些程序代码能够编译通过?
    A: import java.awt.*;package myPackage;class MyClass {}
    B: package myPackage;import java.awt.*;class MyClass{}
    C: /*This is a comment */package myPackage;import java.awt.*;public class MyClass{}
    D: /*This is a comment */package myPackage;import java.awt.*;public class OtherClass{}
  • 举一反三