An object is an instance of a class. This example demonstrates of how to create an object for a class in Java.
MyClass : The class for which object is created.
print() : Prints the output.
m : Object of type MyClass.
new : Keyword that creates the object.
MyClass : The class for which object is created.
print() : Prints the output.
m : Object of type MyClass.
new : Keyword that creates the object.
No comments:
Post a Comment