You will be given three string variables, firstName, lastName, and studentID, which will be initialized for you. (Note t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
You will be given three string variables, firstName, lastName, and studentID, which will be initialized for you. (Note t
You will be given three string variables, firstName, lastName, and studentID, which will be initialized for you. (Note that these variables are declared and read into the program via input in the opposite order.) Your job is to take care of the output as follows: First name: {contents of variable firstName Last name : { contents of variable lastName Student ID: {contents of variable studentID Sample input/output: Input B00123456 Siegel Angela B00987654 Melville Graham Output First name: Angela Last name : Siegel Student ID: B00123456 First name: Graham Last name : Melville Student ID: B00987654
O Exit Full POD.java New 1 /** 2 POD 2.3 3 * CSCI 1105 * 5 * @author Dr. Angela Siegel 6 * @version 1.0 7 * @since 2020-05-01 8 * 9 10- import java.util.Scanner; 11 12 - public class POD{ 13. public static void main(String[] args) { 14 15 //Create a Scanner object to read input from the keyboard 16 Scanner in = new Scanner(System.in); 17 18 //Declare three String variables and initialize (based on input) 19 String studentID in.nextLine(); 20 String lastName in.nextLine(); 21 String firstName in.nextLine(); 22 23 24 || Start your work here || 25 26 27 //HINT: Note that in the output, the semicolons line up vertically 28 29 30 31 || End your work here 32 33 34 35 } 36 } ======= Test Case 4