cours0708/G5a/Solutions/2-exoSyntaxeJava/InverseArgs.java

14 lines
424 B
Java
Raw Normal View History

public class InverseArgs {
public static void main (String[] args) {
int longr;
longr=args.length;
if (longr==0)
System.out.println ("il n'y a pas d'arguments !");
else System.out.println("nb d'args :"+longr);
for (int i =longr-1 ; i>=0; i--) {
System.out.print(" "+args[i]);
}
System.out.println();
}
}