类名
public class Task1
{
⎤
private static String TEXT = "别开玩笑了"; ⎥ 类变量
⎦
⎤
public static void main(String[] args) throws IOException ⎥
{ ⎥
SCREEN OUTPUT 单行注释 ⎥
System.out.println(TEXT); //显示单个字符串 ⎥
多行注释 ⎥
⎥
变量声明 ⎥
String s = "呵呵呵"; ⎥
方法调用 ⎥
printTextMoreTimes(s, 3); ⎥
} ⎥
⎦
方法参数 ⎤
public static void printTextMoreTimes(String s, int count) ⎥ 方法签名
⎦
⎤
{ ⎥
循环 ⎥
for (int i = 0; i < count; i++) ⎥
循环体 ⎥ 方法体/方法代码
{ ⎥
System.out.println(s); ⎥
} ⎥
} ⎥
⎦
}
“嘿,只要解释一遍就明白了。”



