Question: Read the string variables professorName and courseName from input, assuming that the name is a single word and the course contains multiple words with any

Read the string variables professorName and courseName from input, assuming that the name is a single word and the course contains multiple words with any leading spaces.
Ex: If the input is Reed Business Analytics, then the output is:
Reed
Business Analytics import java.util.Scanner;
public class StudentCourse {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
String professorName;
String courseName;
/* Your code goes here */
System.out.println(professorName);
System.out.println(courseName);
}
}

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!