Issue
I'm very new to Java and I was wondering why my code wasn't running.
Is there anything I need to do or I have missed out, every time I click run the bar at the bottom is just infinitely saying "running...".
Solution
Your code is asking for a user input before logging anything, that's probably why you think it's not running.
Try to print something before like this:
System.out.println("Enter a number:");
int i = scanner.nextInt();
System.out.println("You chose " + i);
(Pseudo code)
Answered By - Gaël J