Answers for "what are control statements"

0

control statements

/**  * @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");   } }}
Posted by: Guest on September-23-2021
0

control statements

/**  * @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");   } }}
Posted by: Guest on September-23-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language