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..

1803

How to make a class immutable?

Bosch, TSYS,

15 26596

What is the difference between Abstract Class and Interface

Amdocs,

8 13356

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

2 11289

How to send a request to garbage collector?

4 6874

How can you say HashMap is syncronized?

Arete, IBM,

14 16417

which pattern is default in scanner package?

Satyam,

1787

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

Satyam,

3 16207

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 8635

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 6307

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

CTS,

5 9389

Difference String and String Buffer

4 5934

What is object

6 7297

How to make class immutable

6 8352


Post New Core Java Questions

Un-Answered Questions { Core Java }

Can a abstract class be defined without any abstract methods?

543


What is java string pool?

527


which class is the wait() method defined in? : Java thread

511


Explain the difference between string, stringbuffer and stringbuilder in java?

543


What are the differences between include directive and include action?

531






Difference between throw and throws?

607


What are synchronized methods and synchronized statements in java programming?

560


What is a vararg?

531


Explain the advantages of packages in java?

502


What are inbuilt functions in java?

549


What is identifier with example?

557


What is the primitive type byte?

563


What do you mean by local variable and instance variable?

500


Give me an example of array and linked list? Where they can be used?

542


What is hash table in java?

484