I'm trying to read input in my code but for some reason I can't submit values.
If the input is int, when I enter an integer, nothing happens. I just keep pressing enter. I need mention that I use Intellij Community Edition 2017.1 EAP.
Here is the code:
import java.util.Scanner;
/**
 * Created by David on 21/01/2017.
 */
public class Main {
    public static void main(String[] args) {
        int num;
        Scanner in = new Scanner(System.in);
        System.out.println("Enter a num: ");
        num = in.nextInt();
        System.out.print(num);
    }
}
Output:
Enter a num: 
5
6
3
aasd
1335
What's the problem here?
 
    