Advertisement
Svetlana_Ovsjanikova

java - MoreLists.main

Sep 21st, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package day6_morelists;
  7.  
  8. import java.util.ArrayList;
  9. import java.util.Scanner;
  10.  
  11. /**
  12. *
  13. * @author sao_7
  14. */
  15. public class Day6_MoreLists {
  16.  
  17. /**
  18. * @param args the command line arguments
  19. */
  20. public static void main(String[] args) {
  21. Scanner sc = new Scanner(System.in);
  22.  
  23.  
  24. tasks.getAddLists();
  25. tasks.outputList(); //закомментировать
  26. tasks.removeFromList(); //закомментировать
  27.  
  28. System.out.println("Ievadiet darbibu: add, remove vai outputList");
  29. String choice = sc.next();
  30.  
  31. System.out.println();
  32. String add = tasks.getAddLists();
  33. String remove = removeFromList();
  34. String list = list();
  35.  
  36. switch (choice) {
  37. case "add":
  38. System.out.println(choice = sc.next() + " tiek pievienots sarakstam");
  39. break;
  40. case "remove":
  41. System.out.println(choice = sc.next() + " tiek dzests no saraksta");
  42. break;
  43. case "list":
  44. System.out.println("Saraksts: " + (choice = sc.next()));
  45. break;
  46.  
  47. }
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement