What is Exception handling in Java How do you handle run time errors please explain with an example
2 7589public class AboutStrings{ public static void main(String args[]){ String s1="hello"; String s2="hel"; String s3="lo"; String s4=s2+s3; //to know the hash codes of s1,s4. System.out.println(s1.hashCode()); System.out.println(s4.hashCode()); // these two s1 and s4 are having same hashcodes. if(s1==s4){ System.out.println("s1 and s4 are same."); }else System.out.println("s1 and s4 are not same."); } } Somebody told me that, == operator compares references of the objects. In the above example even though s1 and s4 are refering to same object(having same hash codes), it is printing s1 and s4 are not same. Can anybody explain in detail why it is behaving like this? Thanks in Advance RavuriVinod
4 7630Post New TCS Core Java Interview Questions
Explain internal routers components?
What is difference between add() and addelement() in vector?
What is sliding window protocol ?
what is autodiscover service?
how to test the mobile tower signals? and which software tool & hardware tools used for test the mobile tower?
What is the maximum combined length of command line arguments including the space between adjacent arguments?
What is a news article?
What is distributed application?
what kind of tape library is attached to your tsm server?
What goes into a Test Summary? How would you write a Test Summary?
How do you carry-forward account balances?
what is myisam? : Sql dba
I, Mrinalini has cleared the IDBI bank PO written test held on 14th nov,2010 n i'm orthopaedically challenged.. this is a special recruitment drive for reserved categories n i'm having my intrview on 27th feb'2011 so plz guide me regarding d preparation for dis intrview..those who hv undrgone such intrviews kindly send d info on my e-mail id: mrinalini.mahajan88@gmail.com
What is the difference between the standard and metrics folder?
what is ccdt file on websphere mq or wmq?