This series introduces you to object oriented programming in Java visually using NetBeans IDE. This series will be a bit different from traditional introductions to OOP in Java. In traditional introductions of OOP in Java, we are generally used to working with console applications using the command line.
A Fast Gateway to OOP in Java using NetBeans IDE - Adding your own class (Page 2 of 5 )
Once you have completed all the steps in the previous section, you can proceed with the following steps to create your own class:
Again, right click on “MyPack” -> New -> Java Class (Fig06).
Within the “new java class” dialog, give the Class Name “MyCalc.”
Click on “finish” (which opens your source window).
Once you click on “Finish,” you should be looking at the following skeleton of code:
package MyPack; /** * * @author Administrator */ public class MyCalc {
/** Creates a new instance of MyCalc */ public MyCalc() { }
}
That is the minimum skeleton you need to work with any class in Java. Till now, you can understand that all the code is created for you (ready made). The IDE generally helps you to create the skeleton only. Once the skeleton is ready, you need to customize it according to your requirements.