Writing to the output the arguments of the invoked main function - Java Object Oriented Design

Java examples for Object Oriented Design:Method

Description

Writing to the output the arguments of the invoked main function

Demo Code

public class Main{
    public static void main(String[] args) {
        for (int i = 0; i < args.length; i++)
            System.out.println(i + ":" + args[i]);
    }//  ww w.  j a  v  a  2  s.c  o  m
}

Related Tutorials