开发者

How to printf line in java

开发者 https://www.devze.com 2023-01-16 22:36 出处:网络
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开发者_Pyt

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

精彩评论

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