-3
I need to make a program that reads the keyboard names until the user type the word "order", and then print the typed names in the order they were typed.
So far, I’ve tried to resolve this issue used ArrayList
, in this way:
public class Exercicios {
public static void main(String[] args) {
ArrayList<String> nomes = new ArrayList<>();
while(!nomes.contains("fim")){
for(int i = 0; i < nomes.size();i++){
System.out.println("informes quantos dados desejar e digite 'fim' para finalizar");
nomes.add(nomes.get(i));
System.out.println(nomes.toString());
}
}
}
}
Remembering that pro compiler, no error presented, but no result appears. I wonder what might be happening?
Post what you have already done, we will not do your task.
– Laerte
Please take a read, on this page, how to ask yourself.
– Alexandre Peluchi
Hello, thanks for the tips. Well, so far all I’ve written related to this issue is as follows. Remembering that pro compiler, no error presented, but no result appears. I wonder what might be going on, how you could help me with this problem?
– Maxwell