MCPcopy Create free account
hub / github.com/DuGuQiuBai/Java / main

Method main

day22/code/day22_IO/src/cn/itcast_07/PrintfDemo.java:7–23  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

5 */
6public class PrintfDemo {
7 public static void main(String[] args) {
8 // �̶��ı�
9 // System.out.printf("hellworld\n");
10 // System.out.printf("hellworld\n");
11
12 // ��ָʾ���ı�
13 // System.out.printf("%d\n", 100, 200);
14 // System.out.printf("%d<%d\n", 100, 200);
15 // System.out.printf("%d<%d\n", 100);
16
17 // System.out.printf("%d+%d=%d\n", 10, 20, 30);
18 // System.out.println(10 + "+" + 20 + "=" + 30);
19
20 System.out.printf("%.1f\n", 12.345);
21 System.out.printf("%.2f\n", 12.567);
22 System.out.printf("%.2f\n", 12.564);
23 }
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected