The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

error???

Posted by ping203 on December 21, 2001 at 10:10 AM

Hi,
I tried your program but with no error as long as I provide an argument.
java Reverse arg1
output -> 1gra

but if you dont want to see the exception, use try {} catch(...){}
or just
if (args.length < 1) {
System.out.println("Usage: java Reverse arg1");
System.out.exit(1);
}






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us