Question: Using putty connect to the IST Linux system then use the nano editor to create the following Java command line application Lab1. Pass in two

Using putty connect to the IST Linux system then use the nano editor to create the following Java command line application Lab1. Pass in two arguments from the command line when you run the Lab1.java program. For example java Lab1 FirstName LastName These two arguments get passed into the main method as a String array in the variable object named args - see the method signature below. Noticed it is a static method and does not need an object created to call it since this is the starting point for the program (how could there be any objects before it since this is the starting point). public static void main(String[] args) { Modify the main method to concatenate the two strings FirstName LastName and print them to the command line. System.out.println(args[0] + " " + args[1] + " Rocks!"); //Line Comment

compile it with the command javac Lab1.java. To run it use java Lab1

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!