Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pl.selfimproveit;
- public class IntegerTest {
- public static void main(String[] args) {
- Integer a = 134;
- Integer b = 134;
- if (a == b) System.out.println("The same object! - test 1");
- if (a.equals(b)) System.out.println("Equals values -test 1");
- Integer c = 12;
- Integer d = 12;
- if (c == d) System.out.println("The same object! - test 2");
- if (c.equals(d)) System.out.println("Equals values - test 2");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement