miui 9 谷歌 通讯录 无法同步

Google Contacts Sync 8.1.0

By Google LLC




What’s up with Java’s “%n” in printf?

I’m reading Effective Java and it uses %n for the newline character everywhere. I have used \nrather successfully for newline in Java programs.

Which is the ‘correct’ one? What’s wrong with \n ? Why did Java change this C convention?

Here is a basic example:

int i = 461012;
System.out.format("The value of i is: %d%n", i);

The %d specifies that the single variable is a decimal integer. The %n is a platform-independent newline character. The output is:

The value of i is: 461012
The printf and format methods are overloaded. Each has a version with the following syntax:

public PrintStream format(Locale l, String format, Object... args)




北冥有鱼,其名为鲲。鲲之大,不知其几千里也。化而为鸟,其名 为鹏。鹏之背,不知其几千里也。怒而飞,其翼若垂天之云。是鸟也 ,海运则将徙于南冥。南冥者,天池也。

《齐谐》者,志怪者也。《谐》之言曰:“鹏之徙于南冥也,水击 三千里,抟扶摇而上者九万里,去以六月息者也。”野马也,尘埃也 ,生物之以息相吹也。天之苍苍,其正色邪?其远而无所至极邪?其 视下也,亦若是则已矣。