In eclipse when you copy a code from Internet for example and paste into IDE, when you put mouse on top of method, Eclipse shows this method belongs to what package ans class. So, you can by one click add it to code.
I have copy/pase following code into IntelliJ IDE:
double d1, d2;
Scanner scannerObject = new Scanner(System.in);
d1 = scannerObject.nextDouble();
d2 = scannerObject.nextDouble();
System.out.println("You entered " + d1 + " and " + d2);
My question is, is there a way like eclipse to add package and class name of Scanner into code instead of typing import java.util.Scanner; manually?
press
alt + enter->import classon class, and you will get list of possible packages