1.

How to write a java program which accepts double data type from the keyboard?

Answer»

EXPLANATION:

Use a Scanner OBJECT to scan through a stream of INPUT CHARACTERS and to convert them into a float or a double . The methods that do this are nextFloat() and nextDouble() . Here is a program that inputs a string of characters and CONVERTS that string into primitive type double .



Discussion

No Comment Found