pernyataan kontrol
/** * @author Java Jill * @version 1.0*/public class IfExample1 { public static void main(String[] args) { try { String s1 = args[0]; System.out.println("Your guess was: + s1); if(s1.equals("red")) { System.out.println("Your guess is my favorite color!"); System.out.println("Good job"); } catch (Exception e) { System.out.println("Error - please include an argument"); } }}
GFr