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
6.2.3: Print methods.
5280403489528.qx3zqy7
Jump to level 1
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'printCity(String var1, String var2){
}
System.out.println(var1+" is the location of "+ var2+" College.");
public static void main (String [] args){
Y* Your code goes here */
}
}
1
2
3
 zyBooks catalog CHALLENGE ACTIVITY 6.2.3: Print methods. 5280403489528.qx3zqy7 Jump to level

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!