What is a constructor?
Answers were Sorted based on User's Feedback
Answer / suma
A constructor is one which is used to initialize the
instance variables of an object.
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / srinivasa reddy
Guarrented intilization of instance variables of an object.
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / saravanan
Class name and Methods name are same. It has no Return type.
When create a instance with class the method is
automatically called.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sunil kumar
Constructor is a special method having the same name as class name, without any return type not even void. And it is used to initialize the instance variable.
| Is This Answer Correct ? | 0 Yes | 0 No |
How do you debug your java program?
who should use JNDI?
what debugging tool that can be used to debug the java programs?
What are the interfaces in java collections? : java collections
What are the differences between the java collection and the java list? : java collections
httt method
In HashSet duplicates are allowed while adding to the HashSet, but while retreiving the object from HashSet is not shown the duplicate values, WHY ?
Can any one tell me How to explain bank project desription in interview
How to call the m1() method of Base class in below snippet ? class Base { public void m1() { System.out.println("Base m1 "); } public void m2() { System.out.println("Base m1 "); } } ====================== class Derived extends Base { public void m1() { System.out.println("Derived m1"); } public void m3() { System.out.println("Derived m3"); } public static void main(String[] args) { Base ob=new Derived(); ob.m1(); //System.out.println("Hello World!"+ob.m1()); } }
Hi Friends , am newbie to ajax. For example just consider one account registration - A form contains 8 text fields with submit button. In this form second texbox contains "username " . On right side of text box there is a label box . On clilck action i need to determine user is available or not. Is it possible on clicking label or should i click submit button.
When to use the Collection Classes(HashSet, LinkedHashSet, TreeSet....etc) in real time scenario ?
Which sorting algorithm is used by collections.sort() in java ?