Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if(dChoice == 't' || dChoice == 'T') { // Ta bort namn {
- System.out.print("Ta bort hund vid namn:\t");
- String dName = in.nextLine();
- boolean dMatch = false;
- for (int x=0; x<al.size(); x++) {
- dMatch = al.get(x).getName().equalsIgnoreCase(dName);
- if(dMatch) {
- System.out.print(al.get(x).getName());
- System.out.flush();
- al.remove(x);
- System.out.println(" har blivit borttagen.");
- }
- }
- System.out.println();
- } // } Ta bort namn
Add Comment
Please, Sign In to add comment