waltermilner

Untitled

Jun 25th, 2019
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. public class Test {
  2.  
  3.  
  4.   public static void main(String[] d) {
  5.  
  6.     int x=3;
  7.     int y=3;
  8.     Test t1=new Test();
  9.     Test t2=new Test();
  10.     System.out.println(x==y); // true
  11.     System.out.println(t1==t2); // false
  12.     Test t3=t2;
  13.     System.out.print(t3==t2); // true
  14.     // System.out.println(x==t1);  syntax error
  15.  
  16.   }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment