Question: How could I add an inner helper class to this program? public class HelloWorldTwo { public static void main(String[] args) { // TODO Auto-generated method

How could I add an "inner helper class" to this program?

public class HelloWorldTwo { public static void main(String[] args) { // TODO Auto-generated method stub

//check if no command line arguments if(args.length==0){ System.out.println("Hello World"); return; }

//get first/one command line argument String str = args[0]; if(str.equals("Hello")){ System.out.println("World"); } else if(str.equals("World")){ System.out.println("Hello"); }

else{ System.out.println("Usage: java HelloWorldTwo Hello|World||"); } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!