Core Java Interview Questions
Questions Answers Views Company eMail

Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..

1807

How to make a class immutable?

Bosch, TSYS,

15 26624

What is the difference between Abstract Class and Interface

Amdocs,

8 13361

How to perform Singleton of the java class object on multi JVM?

2 11295

How to send a request to garbage collector?

4 6876

How can you say HashMap is syncronized?

Arete, IBM,

14 16445

which pattern is default in scanner package?

Satyam,

1791

what is d difference between deep cloning and shallow cloning in core java?

Satyam,

3 16218

what is the use of private constructor in core java?

OnMobile, Satyam, Yash Technologies,

3 18273

what is the use of datasource in core java?

Satyam,

3 8647

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

TCS,

4 6319

if two references are having same hash codes,is that means those are refering to same object?

CTS,

5 9392

Difference String and String Buffer

4 5944

What is object

6 7304

How to make class immutable

6 8363


Post New Core Java Questions

Un-Answered Questions { Core Java }

What is the difference between JDBC 1.0 and JDBC 2.0?

2695


Is c better than java?

536


What happens when main () method is declared as private?

643


What is method in java ?

616


Is alive method in java?

500






String class is defined under which package in java?

614


What does split function do in java?

528


Explain the difference between jvm and jre?

552


What is the purpose of garbage collection in java? When is it used?

530


What is java autoboxing?

528


How does the java compiler work?

518


How is abstraction implemented in java ?

532


define polymorphism in java

622


What is a parameter used for?

507


What is widening and narrowing in java? Discuss with an example.

550