Advertisement
LoganBlackisle

SearchApp

Jun 26th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. public class SearchApp {
  2.  
  3.     public static void main(String[] args) {
  4.         ArrayList<Integer> list = new ArrayList<Integer>();
  5.         list.add(6);
  6.         list.add(4);
  7.         list.add(8);
  8.         list.add(13);
  9.         list.add(2);
  10.        
  11.         System.out.println("List should be printed here: " + list);
  12.        
  13.         System.out.println("Does the list contain the number 7? " + s.findNumber(list, 7));
  14.         System.out.println("Does the list contain the number 13? " + s.findNumber(list, 13));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement