QUESTION IMAGE
Question
define a method printuniversitylocation() that has two string parameters and outputs as follows. end with a newline. printuniversitylocation() should not return any value.
ex: if the input is lewisburg bucknell, then the output is:
lewisburg is the location of bucknell university.
1 import java.util.scanner;
2
3 public class universitylocation {
4
5 / your code goes here /
6
7 public static void main(string args) {
8 scanner scnr = new scanner(system.in);
9 string universitylocation;
10 string universityname;
11
12 universitylocation = scnr.next();
13 universityname = scnr.next();
14
15
Step1: Define the method
public static void printUniversityLocation(String location, String university) {
Step2: Print the required output
System.out.println(location + " is the location of " + university + " University.");
Step3: Close the method
}Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
public static void printUniversityLocation(String location, String university) {
System.out.println(location + " is the location of " + university + " University.");
}