You should read the Java
API. Your line 7 calls System.in.read(). So, look up the System class (it's listed in that bottom left pane in the API). There, you can find that the 'in' is an "InputStream". So, look up that object. it has a method called "read".
that method throws an IOException.
Have you read up on error handling and exceptions? There is a quick, easy fix that will haunt you later if you continue using it, and then there is a slightly more complicated but better fix, but that requires some understanding of exceptions.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors