Posts

Showing posts from December, 2025

What is the difference between == and .equals() in java?

==: compares references(memory address) .equals(): Compares content(logical equality) ==: used for primitives and objects. .equals(): used mainly for objets. ==: Can not be overridden. .equals(): Can be overridden. String a = new String("hi"); String b = new String("hi"); System.out.println(a == b); // false System.out.println(a.equals(b)); // true Source: TpointTech

What is java?

 Java is object-oriented,high-level <a href="https://www.tpointtech.com/java-tutorial">programming language</a>  and it is plateform independent. >Write once,Run Anywhere(WORA) What is the  mean of platform  independent? The code of java convert in bytecode which is run on JVM,So same code run on windows,linux and Mac. Source: TPointTech