This tutorial deals with how to add another java class to your project, how Intellisense learns about the classes you are creating, and how to use the NetBeans "Refactor" feature.

Step 1: Create a new Java Class

newfile1

newfile2


Step 2: Make the Person class do something

person


Step 3: Using intellisense & auto-complete with the classes you create

personinstance

personintelli

personauto

personoutput


Step 4: Using the Netbeans "Refactor" feature

Lets say we are not happy with the name we gave the method "displayName" in the Person class. We would like to change it to "printName" instead. This is simple, but one problem occurs: we have to change every place that called "displayName" as well. This is where Refactor comes in.

refactor1

refactor2

refactor3

refactor4

You can refactor methods, variables, and other things as well. If you want to rename a class, you MUST use refactor because there are many dependencies on class names.

Now that you have a working program, read about how to submit your homework in the next tutorial.