Latihan Bahasa Pemrograman Java

BAB 8
Argumen dari Command-line


Jawaban 8.4 Latihan
8.4.1 Mencetak Argument

public class Main {
public static void main( String[] args ){
System.out.println("Number of arguments=" +args.length);
System.out.println("First Argument=" + args[1] +" "+ args[2] + " " + args[3] + " " + args[4] + " " + args[5]);
}
}

No comments:

Post a Comment