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

What is jersey in java?

658


What is exe file in java?

677


What is mime in java?

677


Can we extract main method from another class?

702


what is the package for freshers in valuelabs.

5877


How do I know if I have jre or jdk?

683


How do I create an executable jar file?

742


How can you work with permissions from your .net application? : java security

675


What is jdk jre and jvm?

679


How do I enable java in google chrome?

642


how can we create the ui using netbeans,having the code?

1800


What are jpa annotations?

651


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

4305


What is data encapsulation?

722


How does jpa repository work?

705