What happens if a constructor is declared private?


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

Post New Answer

More Core Java Interview Questions

Is Java is 100% pure OOPS? Explain?

27 Answers   ANZ,


how to print hello world every second till i have pressed enter key ???

1 Answers   SAP Labs,


How to call one constructor from the other constructor ?

0 Answers  


What is singleton pattern?

0 Answers  


What is immutable class? how to make a Class explicitly "Immutable"?Wap to make a class explicitly immutable.

3 Answers  






What is integer valueof?

0 Answers  


String is a immutable objects . it means that string does not change........... But it will be chang......... { String s="kapil"; String s1="raj"; String s=s1; then print(.......) The String has been changed .. how it is possible and why its called immutable objects

7 Answers  


What are controls and their different types in awt?

0 Answers  


Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?

0 Answers   Genpact,


"We cannot create an object of interface but we can create a variable of it". Discuss the statement with the help of an example. (Plz help us to provide immediately.)

3 Answers  


What is the difference between class forname and new?

0 Answers  


Is it possible to write JAVA program without including any of the packages,such as "import java.io.*"; bcoz I instantly wrote a code without "import..." statement and runned the program on command Line & it worked. the code is: class Person { String name; int age; Person(String s,int a) { name = s; age = a; } accept() { System.out.println(name+"Hi!!!!!"); System.out.println(age); } } class Demo { public static void main(Strings args[])throws IOException { String name = args[0]; int age = Integer.parseInt(args[1]); Person p = new Person(name,age); p.accept(); } }

3 Answers  


Categories