ICSE Class 10 Computer Applications Question 13 of 22

Input in Java — Question 16

Back to all questions
16
Question

Question 16

Write a statement to let the user enter an integer or a double value from the keyboard.

Answer
Scanner keyboard = new Scanner(System.in);
double num = keyboard.nextDouble();
Get the Bright Tutorials app Stuck on a question? Ask Bright Buddy — your AI tutor — for step-by-step help in the app.