美文网首页
2.打印输出

2.打印输出

作者: Cateax | 来源:发表于2020-04-14 21:17 被阅读0次

打印输出

输出

用 “+” 拼接后输出

package my;
public class HelloWorld
{
    public static void main(String[] args)
    {
        //用两个横杠表示注释
        //拼接后输出,可以进行计算
        System.out.println("数学:"+135+",英语:"+(130+10));
    }
}

代码格式化:选中代码 - 右键 - Source - Format (快捷键:Ctrl + Shift + F)

相关文章

网友评论

      本文标题:2.打印输出

      本文链接:https://www.haomeiwen.com/subject/jnmxvhtx.html