Monday, February 2, 2015

3. Hello Name - 2

3. Write a program in java to print "Hello Name" using command line argument with taking care of possible runtime exception.
Solution

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. public class shubhs{
    public static void main(String args[]){

    for(int i=0;i<args.length;i++){
    System.out.println(args[i]);
    }
    }
    }

    /*
    javac shubhs.java
    java shubhs Hello Name
    */

    ReplyDelete