Help with I/O in java

I’ve looked up at various places and found two most common ways of dealing with STDIN in Java:

  1. Scanner in = new Scanner(System.in);
  2. BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

However, while trying out the above ways in various practice problems and competitions, I usually run out of time. I believe it is due to slow I/O in Java.

Can anyone please suggest me a way to possibly reduce this time? Thanks in advance!