Java View all facts Glossary Help |
| syntactic unit > access unit > constructor > constructor with no parameters |
| constructor with no parameters | ||||
| subject | fact | |||
| constructor with no parameters | is a subtopic of Constructors | ![]() |
| is a kind of constructor | ![]() | |
| must be defined if you define a constructor with parameters and you create instances using a constructor with no arguments | ![]() | |
| constructor | always have the same name as the class | ![]() |
| can be overloaded using method name overloading | ![]() | |
| can call another constructor in the same class, instead of the superclass's zero-parameter constructor, by adding a new statement (as the first statement in the constructor) consisting of the keyword this followed by an argument list | ![]() | |
| can call another constructor in the superclass, instead of the superclass's zero-parameter constructor, by adding a new statement (as the first statement in the constructor) consisting of the keyword super followed by an argument list | ![]() | |
| can not be called directly | ![]() | |
| can not return a value | ![]() | |
| can use a constructor of the class's superclass with a super() call | ![]() | |
| does not have a return type | ![]() | |
| does not have a return type since it does not return a value | ![]() | |
| does not return a value | ![]() | |
| facilitates data abstraction | ![]() | |
| has the same name as its class | ![]() | |
has example // Example of creation of an account with an initial balance | ![]() | |
has example //Example of constructor for the class Stack | ![]() | |
has purpose to initialize the instance variables of a newly created object and perform any other needed initialization ![]() | ![]() | |
| has typically 1 or more arguments that determine some of the values of the variables of the class | ![]() | |
| is not a member | ![]() | |
| is not a method | ![]() | |
| is called when the new operator is used to create an instance of a class | ![]() | |
| is not inherited by a subclass | ![]() | |
is part of class ![]() | ![]() | |
| may have access modifier | ![]() | |
| normally calls the zero-parameter constructor in the direct superclass first | ![]() | |
| provides a way to initialize a new object | ![]() | |
| access unit | has access mode | ![]() |
| syntactic unit | has syntax rule bold = mandatory | ![]() |
Next constructor: default constructor Up: constructor