Advertisement
Guest User

FileService

a guest
Jan 19th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. import java.io.File;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. import java.util.Scanner;
  5.  
  6. //Zaimplementuj kod do wczytywania listy drinków z pliku barmanX.txt z folderu resource
  7. //oraz listę składnikow z pliku ingridients.txt
  8. public class FileService {
  9.     static List<Drink> readDrinkListFromFile(String file){
  10.         return new ArrayList();
  11.     };
  12.  
  13.         File file = new File ("barman1.txt");
  14.         Scanner in = new Scanner(file);
  15.  
  16.         File file2 = new File ("barman2.txt");
  17.         Scanner in = new Scanner(file2);
  18.  
  19.         String zdanie = in.nextLine();
  20.  
  21.         // Jak zaimplementowac txt tak zeby pokazywaly sie nazwy drinkow tylko, ale zeby pobrane bylo wszystko ?
  22.  
  23.  
  24.  
  25.     static List<Drink> readIngridientListFromFile(String file){
  26.         return new ArrayList();
  27.     };
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement