Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1.  
  2. public ArrayList<String> generateSpecMed(){
  3.  
  4. ArrayList<String> medSpec = new ArrayList <String>();
  5.  
  6. Scanner myObj = new Scanner(System.in);
  7. String specialty = new String();
  8.  
  9. String out = "Digite as especialidades, uma por linha, digite 0 para sair";
  10.  
  11. do{
  12.  
  13. specialty = myObj.nextLine();
  14.  
  15. if(specialty.equals("0"))
  16. break;
  17.  
  18. if(searchEsp(specialty)){
  19.  
  20. medSpec.add(specialty);
  21. }
  22. else{
  23.  
  24. String error = "Especialidade nao encontrada";
  25. }
  26. }while(true);
  27.  
  28. return medSpec;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement