打印输出
输出
用 “+” 拼接后输出
package my;
public class HelloWorld
{
public static void main(String[] args)
{
//用两个横杠表示注释
//拼接后输出,可以进行计算
System.out.println("数学:"+135+",英语:"+(130+10));
}
}
代码格式化:选中代码 - 右键 - Source - Format (快捷键:Ctrl + Shift + F)
网友评论