Difference between revisions of "Team1/Creating a Java class"

From CDOT Wiki
Jump to: navigation, search
(Created page with ' '''5. Creating a java class ''' <br/>Go to the "src" folder in your package and right click on it, then select: New -> Class 500px <br/>In the "New J…')
 
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
=== 5. Creating a Java class inside a package ===
  
 +
5.1. Go to the "src" folder in your package and right click on it, then select: ''New -> Class''<br/>
 +
[[Image:newclass1.jpg |600px]]
  
'''5. Creating a java class '''
+
<br/>5.2. In the ''New Java Class'' window, write down your class name, e.g."VehicleRegistration" and check the ''public static void main(String[] args)''. Press Finish to close the window.<br />
<br/>Go to the "src" folder in your package and right click on it, then select: New -> Class
+
[[Image:newclass2.jpg |500px ]]
[[Image:eclLab1_1.jpg|500px ]]
 
  
<br/>In the "New Java Class" window, write down your class name, e.g."Lab" and check the "public static void main(String[] args)"
+
<br/>5.3. The following code will be the content of the ''VehicleRegistration'' class in ''cs.ecl.basics.lab'' package.<br />
[[Image:eclLab1_2.jpg|400px ]]
+
[[Image:newclass3.jpg |600px ]]
 
 
<br/>The following code will be the content of the Lab1_1 class.
 
[[Image:eclLab1_3.jpg|500px ]]
 

Latest revision as of 11:20, 30 January 2011

5. Creating a Java class inside a package

5.1. Go to the "src" folder in your package and right click on it, then select: New -> Class
Newclass1.jpg


5.2. In the New Java Class window, write down your class name, e.g."VehicleRegistration" and check the public static void main(String[] args). Press Finish to close the window.
Newclass2.jpg


5.3. The following code will be the content of the VehicleRegistration class in cs.ecl.basics.lab package.
Newclass3.jpg