devxlogo

November 13, 2000

String Equality

Question: When you compare two objects through the”== operator,” Java checks for reference equality. For example, if you create two String objects with “new” keywords and initialize them with same

Memory Addresses

Question: How do I get the addresses of primitive variables, reference variables, and objects in Java? Answer: Unlike systems programming languages like C, Java does not have pointers. Objects are