Suno! A chand c larki,
abi tm titliyan pakro,
ya phir guryon se khailo tum,
ya phr masoom c ankho sey,
dhairon khwab dekho tum,
faraz faiz o mohsin ki kitaben mat parhna abi,
ye sab lafzon k sahir hain,
tumhy uljha k rakh daingy,
tumhy maloom hi kab hy,
mohabat k libadey me hawas o hirs hoti hy,
ye insano ki duniya hy,
magar in se kahin barh k yahan wehshi darindey hain,
wo wehshi jinki ankhon me machaltey piyar k peechy,
hawas o hirs hoti hy,
abi kachi kali ho tum,
abi kanton sy mat khailo,
abi apni hatheli py ksi ka nam mat likho,
abi apni kitabon me gulabi phool mat rakho,
mat rakho!!
;( so true!!! ;(
Java Interview Questions & Answers: user defined key class
This is one of my favorite core Java interview questions as not knowing this can cause subtle and intermittent issues in Java. The issues that arise from not understanding equals( ) and hashCode( ) contract can be hard to debug. Q. When providing a user defined key class for storing objects in a Map (e.g. HashMap) , what methods do you have to provide or override (i.e. method overriding)? A. You should override the equals( ... ) and hashCode( .. ) methods from the Object class. The default implementation of the equals( ... ) and hashCode( ... ) methods are inherited from the java.lang.Object class uses an object instance’s memory location (e.g. MyObject@6c60f2ea). This can cause problems when two instances of car objects have the same color but the inherited equals( .. ) will return false because it uses the memory location as oppose to the color, which is different ...
Comments
Post a Comment