公有私有
public class ClassName { // ... } private boolean myFlag; static final double weeks = 9.5; protected static final int BOXWIDTH = 42; public static void main(String[] arguments) { // 方法体 }
String version = "1.5.1"; boolean processOrder() { return true; }
public class Logger { private String format; public String getFormat() { return this.format; } public void setFormat(String format) { this.format = format; } }
public static void main(String[] arguments) { // ... }
class AudioPlayer { protected boolean openSpeaker(Speaker sp) { // 实现细节 } } class StreamingAudioPlayer extends AudioPlayer { protected boolean openSpeaker(Speaker sp) { // 实现细节 } }
标签:总结,String,format,class,学习,boolean,static,public,3.9 From: https://www.cnblogs.com/clh628/p/17201807.html