📜  java 扫描器输入浮点数 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:42.993000             🧑  作者: Mango

代码示例1
import java.util.*;
class Program
{
  static void main()
  {
    Scanner sc = new Scanner(System.in);
    System.out.print("Enter float: ");
    float num = sc.nextFloat();
    System.out.println("You Entered " + num);
  }
}