public class Test

{

public static void main(String ar[])

{

Integer a = 10;

Integer b =10;

Integer c = 145;

Integer d = 145;

System.out.println(a==b);

System.out.println(c==d);

}

}

Answer Posted / ravi

using "Singletone Design pattern" we can prevent class creating multiple objects.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When throw keyword is used?

787


Does set allows null in java?

701


What methodology can be employed to locate substrings inside a string?

710


What is the private method modifier?

798


How to change the priority of thread or how to set priority of thread?

762


What is meant by 'Class access modifiers'?

791


Explain java coding standards for interfaces?

844


What is the default size of set in java?

700


What are void methods?

783


What is the size of a string in java?

727


Explain the difference between extends thread vs implements runnable in java?

791


What is the latest java version?

788


How do you represent a space in regex java?

717


Can set contain duplicates?

756


What is dynamic binding(late binding)?

784