Difference between hashCode() & equals()?
Answers were Sorted based on User's Feedback
Answer / rohan
equals() method of string class compares the contaits of string
equals() method of object class compares the address of objects
Hashcode() method returns the unique identification code of
particular object.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / srikanth
hashCode() method returns integer no assigned by jvm
ie ...it is for identifying objects in heap memory very
fastly
equals() it is for comparing addreess of objects
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / srikanth
hashCode() method returns integer no assigned by jvm
ie ...it is for identifying objects in heap memory very
fastly
equals() it is for comparing addreess of objects
| Is This Answer Correct ? | 3 Yes | 3 No |
public class BatchTest { public static void main(String[] args) { Runtime run = Runtime.getRuntime(); try { Process p = run.exec("cmd start /c D:/test.bat"); System.out.println(p.exitValue()); } catch (Exception e) { e.printStackTrace(); } System.out.println("FINISHED"); } }
Explain the difference between abstraction and encapsulation.
Will minecraft java be discontinued?
What is the difference between abstract classes and interfaces?
explain the collection in java
Can we define constructor in inner class?
Similarity and difference between static block and static method ?
What are class types in java?
How we can generate random numbers in java?
What is the method used to get the absolute value of a number?
Is there any limitation of using inheritance?
how can i cal servlet from jsp page?how can i pass variablesfrom the jsp that servlet can access?