Home » Java Programming » Objects and Collections

What will be the output of the program? public static void main(String[] args) { Object obj = new Object() { public int hashCode() { return 42; } }; System.out.println(obj.hashCode()); }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!