scg/ch10/PrintAllArgumentsFANG

From FANG

Jump to: navigation, search

01 package scg.ch10;
02 
03 import java.util.ArrayList;
04 
05 import fang2.core.Game;
06 import fang2.util.InitializeApplication;
07 
08 /**
09  * Uses FANG methods to get the arguments passed into the program.
10  */
11 public class PrintAllArgumentsFANG
12   extends Game {
13   /**
14    List all the command-line arguments on standard output.
15    */
16   @Override
17   public void setup() {
18     ArrayList<String> args = InitializeApplication.getUnnamedArgs();
19     System.out.println("PrintAllArgumentsFANG:");
20     for (int = 0; i != args.size()++i{
21       System.out.println("  args[" + i + "] = \"" + args.get(i+ "\"");
22     }
23   }
24 }
25 
26 //Uploaded on Mon Mar 29 21:41:02 EDT 2010


Download/View scg/ch10/PrintAllArgumentsFANG.java





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter

Games
Games