Learn Java Programming - Constructor Overloading Tutorial

preview_player
Показать описание
One of the really cool features of Java is the ability to overload constructors. What is an overloaded constructor? Basically, an overloaded constructor is multiple constructors all with different signatures. The signature consists of the constructor name followed by the parameter list enclosed in parenthesis. In this tutorial I am going to add in a new instance variable to my Box class. This new instance variable will hold a String value that will specify the unit of measurement. This tutorial will build on the Box class from my Constructors Part 4 tutorial.
Рекомендации по теме