O
O
OlavHeilag2019-12-03 16:22:32
Java
OlavHeilag, 2019-12-03 16:22:32

Why swears at 'cannot resolve method'?

'Friends&Family' task
In the line with the nextDouble() and nextInt() methods, it gives an error...
5de65f093ef54905035008.jpeg
moreover, when working with the scanner:
5de65f303bc69406092347.jpeg
everything works fine.
The point is - do?! But no! I pasted the example from the explanation and it gave the same error! I'm clearly missing something!
*one thing is good while smoking, read a lot of interesting things...
** jdk1.8.0_231 and java jre1.8.0_231 work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2019-12-03
@zagayevskiy

Obviously, it's the wrong import. You need java.util.Scanner.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question