PrintfExamples.java Source code

Java tutorial

Introduction

Here is the source code for PrintfExamples.java

Source

public class PrintfExamples {
    public static void main(String[] args) {
        System.out.printf("1.0 5f num is %5f\n", 1.0);
        System.out.printf("1.0 4f num is %4f\n", 1.0);

    }

}
/*
1.0 5f num is 1.000000
1.0 4f num is 1.000000
    
 */