To create an object of Main , specify the class name, followed by the object name, and use the keyword new :
Read moreHow do you write a class declaration?
At minimum, the class declaration must contain the class keyword and the name of the class that you are defining. Thus the simplest class declaration that you can write looks like this: class NameOfClass { . . . } For example, this code snippet declares a new class named ImaginaryNumber.
Read more