Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. System.out.println("---Browse Auction---");
  2.  
  3. String[] auctions = {"Car - Honda Civic VTI 1.8 Petrol", "Sony Bluetooth Speakers", "auctionObject" };
  4.  
  5. java.util.List<String> list1 = java.util.Arrays.asList(auctions);
  6.  
  7.  
  8. System.out.println("Search::");
  9. String searchWord = S.next();
  10.  
  11. if (list1.contains(searchWord)) {
  12. System.out.println("Auction Found : ");
  13. java.util.Arrays.toString(auctions);
  14. }else {
  15. System.out.println("No Match Found :");
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement