How can I read a double variable from keyboard in Java? I\'m trying to solve this, but it didn\'t works. It said:
Exception in thread \"main\" java.util.I
You can also use BufferedReader Class to take Double as input. It can be taken as
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String s=br.readLine(); Double d=Double.parseDouble(br.readLine()); int i=Integer.parseInt(br.readLine());