关于Java中的包,以下哪项是正确的?
null
1) Every class is part of some package. 2) All classes in a file are part of the same package. 3) If no package is specified, the classes in the file go into a special unnamed package 4) If no package is specified, a new package is created with folder name of class and the class is put in this package.
(A) 只有1、2和3 (B) 只有1、2和4 (C) 只有4个 (D) 只有1和3 答复: (A) 说明: 在java中,包可以被看作是与C++语言的命名空间相当的。 这个问题的小测验
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END