Write a function to find out longest palindrome in a given string?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?

0 Answers   RBS, TCS,


what is the use of datasource in core java?

3 Answers   Satyam,


Is alive in java?

0 Answers  


How is the marker interface used in Java?

0 Answers   BirlaSoft,


What is the difference between && and & in java?

0 Answers  


How many arguments can a method have java?

0 Answers  


What is an empty string in css?

0 Answers  


How many bytes is a string in java?

0 Answers  


Explain enumeration in java?

0 Answers  


What is quick sort in java?

0 Answers  


public 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 Answers   TCS,


Can we override the overloaded method?

0 Answers  


Categories