Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

taking * as a command line argument

843785Dec 5 2008 — edited Dec 5 2008
when trying to run following program I get file names as the result when an agument line 1 * 3 which has * in it is given. Even though the expected output is
1
*
3

It worksa for + - and /, but not for *.

program is as follows

class TestingStar{

public static void main(String args[]){

System.out.println(args[0]);
System.out.println(args[1]);
System.out.println(args[2]);
}

}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2009
Added on Dec 5 2008
1 comment
99 views