Why doesn't this code work?
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner s = new Scanner(System.in); while(true){ String str = s.nextLine(); if(str.equals("49")) break; else System.out.println(str); } } }