There is a way to use the Scanner class that does not require a console: Put the input values into the Scanner class's constructor:
Scanner input = new Scanner("3.4 5.6 7.8"); // Load 3...
Type: Posts; User: Norm
There is a way to use the Scanner class that does not require a console: Put the input values into the Scanner class's constructor:
Scanner input = new Scanner("3.4 5.6 7.8"); // Load 3...
At line 10 the program calls the nextDouble method but there isn't any double value available.
What was entered for the Scanner class's nextDouble method to read?
The && operator works with two boolean operands: boolean1 && boolean2
In the expression:
root1 && root2 == 0
Only the expression: root2 == 0 has a boolean value
root1 is a double and not a...
Please edit your post and wrap your code with code tags:
**YOUR CODE GOES HERE**
to get highlighting and preserve formatting.
Start with the first { and find its matching }