English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2007-03-22 04:13:30 · 3 answers · asked by biplab m 1 in Computers & Internet Programming & Design

3 answers

with the "new" construct.

In most programming languages a Class has a constructor function (or method) which is used to create an instance of the Class, which will be an Object.

example:
myObject = new myClass();

2007-03-22 04:18:13 · answer #1 · answered by Fabian 2 · 0 0

a constructor is always a sub routine not a function means there is no return value

a constructor is declared normally as any other method regarding the language you use

finally it should be the same name of the class

note some languages refer to a constructor being declared by "new"

2007-03-22 11:21:28 · answer #2 · answered by Rami 5 · 0 0

which language?

2007-03-22 11:16:17 · answer #3 · answered by zdanev78 3 · 0 0

fedest.com, questions and answers