Next Line Method in Java