Advantages and Disadvantages of using System.out.printf();

后端 未结 2 1957
闹比i
闹比i 2021-01-14 12:02

I was just wondering what were the advantages and disadvantages of using System.out.printf(); We normally use System.out.println(); or System

2条回答
  •  Happy的楠姐
    2021-01-14 12:33

    Printf allows special formatting:

    http://java.sun.com/developer/technicalArticles/Programming/sprintf/

    That is the advantage. Otherwise there is no disadvantage to calling print() as you do now.

提交回复
热议问题