So, let me show the code first.
public class Class1 {
private static class Class2 {
String name;
Object value;
EntryNode next;
}
}
So, as you guess, I am working on linkedlists. So, for a given value as a parameter in a function;
public Object put(String name, Object value) {
...
...
if (head.value == value) {
}
}
So, in particular, can we use this equality symbol '==' for Object class? In general, except Strings, can we use '==' in any class? If it was string, then no. If it was integer, then definitely yes. But now, how can you compare?