开发者

How to printf line in java

Hello I'm new in java and I have an assignment to printf a line. I think it is printf line in java but I'm only familiar with assembly and C++ advanced editions. How should I go about prin开发者_Python百科ting a line in Java??


System.out.printf(...) Javadoc


public class Main {
    public static void main(String[] args) {
        int i = 42;
        System.out.printf("life universe and everything = %d%n", i);
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜