What is difference between “==” and equals()?
“==”: It compares references (memory locations). It does not compares values in the memory location. Hence it is not recommended to find the equality of two objects. It is mostly used to compare primitive types.
equals(): It is used to find the equality of two objects. It actually compares with the values that an object contains.
| Is This Answer Correct ? | 5 Yes | 0 No |
What are the differences between abstract class and interface?
as we know a static method could access static data and static method only. then how could main method call the object of aclass which is not static and other non static data
What is remote method invocation (rmi)?
Explain about assignment statement?
Why is the type for real numbers called double?
Why java doesn’t support multiple inheritances?
class A{ some variables; public void a()throws Excepion1,Exception2{....} } class B extends A{ variables... public void a()throws E2,E3{.....} } Qns: here override of methods occurs or not,ore else wil give any compilation error or run properly..plz tell me briefly whts happening with the above codes....
What is the purpose of the main method?
Is int a class in java?
Can we define private and protected modifiers for the members in interfaces?
Explain the difference between collection api and stream api in java8?
Under what circumstances an object reference be cast to an interface reference?