what is constructer?what are the type of constructer with
example.

Answer Posted / kool

A constructer has same name as class .it does not have any
data type in a program we can only have one constructer
with a class name because they can be overloaded.if we dont
create one the programe creates one for us.

public class kool{

/** constructer

public kool(){
*/
}
}

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I find jre version?

471


What is the difference between a jdk and a jvm?

491


What is cache in java?

504


Can I use openjdk for commercial?

502


what are the different phases in delivering the project during development and maintenance?

4139






I have deployed a .war file in my application server comprising of struts and hibernate.If i want to change the "dialect" property of hibernate cfg file how can i change(I have only .war file)... Thanks in advance

1435


Which class is the superclass of every class?

519


In an htm form i have a button which makes us to open another page in 15sec.how will you do that?

1360


How do javabeans work?

474


What are the advantages of java 8’s date and time api over old date api and joda time api?

638


Do I need jdk or jre?

471


What is java net url?

447


What is default constructor in java?

450


How do I enable jvm?

468


What are jdk tools?

471