Question: whats the output? import java.util.Scanner; public class StringInputStream { public static void main ( String [ ] args ) { String item 1 Info =

whats the output? import java.util.Scanner;
public class StringInputStream {
public static void main(String[] args){
String item1Info = "Eraser 54";
String item2Info = "Mug 1512";
String item3Info = "Book 2126";
Scanner itemISS = new Scanner(item1Info);
String item;
int quantity;
int price;
item = itemISS.next();
quantity = itemISS.nextInt();
price = itemISS.nextInt();
System.out.println(item +" x"+ quantity);
System.out.print("Price: "+ price);
}
}

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!