Introduction to OOP: Chapter 4: Messages, Instances, and Initialization: [previous] [audio] [real] [text]

Constructors in Java

As in C++, a constructor in Java is simply a member function with the same name as the class:

class newClass {
	...
	newClass (int i) {
		... // initialization
		}
}
Intro OOP, Chapter 4, Slide 16