Team2/Creating a Java Class
Guide Line
- To create a java class, right click on the package we created earlier (firstAPP) then highlight "New" and scroll down to "Class"
- Under the name text box, enter "Lab1" and click on the button "Finish"
- Copy and paste the following code
package firstAPP; public class Lab1 { public int c = 4; public void printHello() { System.out.println("Hello"); } public int returnC() { return c; } }
- We will be using this sample code as we continue with this tutorial
- Click Here to progress with the tutorial