Home > Back-end >  Java has been prompt can not find the package, but I have to add
Java has been prompt can not find the package, but I have to add

Time:10-26

Import the Java. Until. Scanner;
Public class InputMess {
Public static void main (String args []) {
Scanner reader=new Scanner (System. In);
System. The out. Println (" input name (press Enter to confirm) : ");
String name=reader. NextLine ();
System. The out. Println (" input age (press Enter to confirm) : ");
Byte age=reader. NextByte ();
System. The out. Println (" input height (press Enter to confirm) : ");
Float height=reader. NextFloat ();
28 System. Out. Printf (" % s \ n ", "basic information -- -");
System. The out. Printf (" % s % - 10 s \ n ", "name:", name);
System. The out. Printf (" % % 4 s - 4 d ", "age:", the age);
System. The out. Printf (" % 4 s % 4.2 f ", "height:", height);
}
}

Has been compiled is wrong, but change not to come out of trouble a great god help

CodePudding user response:

import java.util.Scanner;
Util, not until to remove n, pay attention to spelling
  • Related