i need help for generating of unlimited strings from keyboard, but this don't work..
Scanner input = new Scanner(System.in);
    ArrayList<String> al = new ArrayList<String>();
     String check=null;
      while(true){
          check = input.nextLine();
          if(check == "stop") break;
          al.add(check);
      }
      System.out.println(al);
}
}
 
     
    