Java Reference
In-Depth Information
The output is shown here:
In the program, notice that the
func( )
method of
MyFunc
returns a reference of type
MyClass
and has a
String
parameter. Next, notice that
MyClass
defines two constructors.