answersLogoWhite

0

import java.util.*;

public class Example

{

public static void main(String[] args)

{

Scanner in = new Scanner(System.in);

System.out.println("Please enter a Double:");

double numDouble = in.nextDouble();

}

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do you input an operator between two numbers in java?

You type it in with your keyboard.


Why will keyboard not respond when logging into RuneScape?

Answer: Your keyboard isn't connected to your computer or download the newest version of Java. Answer: If you clicked somewhere else, it may be that the Java applet doesn't "have the focus". You may have to click first, to have the Java applet (RuneScape) react to the keyboard.


What three objects are necessary to create a GUI in Java?

A computer, keyboard and Java compiler.


What are two Java primitive types store floating-point numbers?

In Java, you can use either a float or a double


How does one write a keyboard macro in Java?

Download


What are real constants in java?

"real" numbers, in any programming language, are actually approximations of what is called a "real number" in math. Basically, a number that can handle decimals - but unlike the actual real numbers, of limited precision. In Java, the "real" data types are float, and double. double has greater precision. A "constant" in Java is similar to a variable, but its value can't be changed after it has been assigned a value.


Which is the best way to convert numbers in string under java?

All of the Java number classes have a parse[type] method, like parseInt() in Integer or parseDouble() in Double that convert Strings to primitive numbers. String s = getInput(); int var = Integer.parseInt(s);


Only numbers 5 and 6 work out of all numbers on keyboard?

Buy new keyboard.


How can I convert a float to a double in Java?

To convert a float to a double in Java, you can simply assign the float value to a double variable. Java will automatically perform the conversion for you. Here's an example: java float floatValue 10.5f; double doubleValue floatValue; In this example, the float value 10.5f is assigned to the double variable doubleValue, which will now hold the converted double value.


Does long int and long double data types are used in java as in c?

There is does a 'long' datatype in java, but no 'long double'.


Is unsigned int var valid in java?

No. Java uses no unsigned numbers.


Where is the keyboard menu?

Part of keyboard with letters and numbers etc