Loading

摘要: 第5章 初始化 5.1 用构造器确保初始化 Java采用与C++相同的解决方案:构造器采用与类相同的名字。 class Rock { Rock() { // This is the constructor System.out.print("Rock "); } } public class Sim 阅读全文
posted @ 2022-07-28 08:45 我只有一天的回忆 阅读(70) 评论(0) 推荐(0)