Question: Please using Java and modify Hello World program to include the following: public class HelloWorld { // class starts here public static void main(String[] args)
Please using Java and modify Hello World program to include the following:


public class HelloWorld { // class starts here public static void main(String[] args) System.out.println("Hello world!!'); System.out.print(message()); } public static String message() { String city; city = "Chicago"; return city; } } 0 Prompt the user to enter a string as input. Include a method, named printMessage. The method should accept a String as a parameter, which will be the output it prints using a println statement. When you call the printMessage method from main, include the method call inside a for loop, so that the method gets called 5 times. Experiment with different method calls, passing different string arguments to the print method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
