Advertisement
Cs_java987

Untitled

Mar 9th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. public class TestProduct {
  2. public static void main(String[] args) {
  3. Product p1 = new Product("Xbox", 13, 18, 1, "Games");
  4. String[] hobbies = { "Games", "TV", "Movies" };
  5. Customer c3 = new Customer(212654321, "Elad", 16, 1, hobbies);
  6. if (p1.isRelevant(c3))
  7. System.out.println(p1);
  8. String[] a = new String[3];
  9. a[0] = "football";
  10. a[1] = "chess";
  11. a[2] = "reading books";
  12. Customer c1 = new Customer(57852451, "Itamar", 10, 1, a);
  13. Customer c2 = c1;
  14. c2.setId(55253876);
  15. System.out.println(c1);
  16. System.out.println(c2);
  17.  
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement