Java Scanner Input Float

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);
  }
}
LOL