Question: zyBooks catalog CHALLENGE ACTIVITY 6 . 2 . 3 : Print methods. 5 2 8 0 4 0 3 4 8 9 5 2 8
zyBooks catalog
CHALLENGE
ACTIVITY
: Print methods.
Jump to level
Read four strings from input and call printCity to output as follows.
Ex: If the input is Northampton Clinton Smith Hamilton, then the output is:
Northampton is the location of Smith College.
Clinton is the location of Hamilton College.
import java.util.Scanner;
public class City
public static void'printCityString var String var
System.out.printlnvar is the location of var College.";
public static void main String args
Y Your code goes here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
