Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public static String showInfo(String input){
  2. File csv = new File("EVapp.csv");
  3.  
  4.  
  5. try{
  6. Scanner keyboard = new Scanner(csv);
  7. keyboard.useDelimiter(",");
  8. while (keyboard.hasNext()){
  9. if (keyboard.next().equalsIgnoreCase(input)){
  10. return (keyboard.next() + keyboard.next() + "\n");
  11. }
  12. keyboard.next();
  13. }
  14. return("No match");
  15. }
  16. catch(FileNotFoundException e){
  17. e.printStackTrace();
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement