Java Class Naming and File Naming: A Quick Quiz
Statement A: In Java, class 'Manager' and class 'manager' are the same class.
Statement B: The Java file name must be the same as the public class name in the file.
The correct answer is B only B is correct.
Java is case-sensitive, so 'Manager' and 'manager' are different class names. However, the Java file name must match the name of the public class within it.
原文地址: https://www.cveoy.top/t/topic/ozTC 著作权归作者所有。请勿转载和采集!