Difference between revisions of "Creating a Java class"

From CDOT Wiki
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
'''5. Creating a java class '''
 
'''5. Creating a java class '''
 
 
<br/>Go to the "src" folder in your package and right click on it, then select: New -> Class
 
<br/>Go to the "src" folder in your package and right click on it, then select: New -> Class
 
  [[Image:eclLab1_1.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/>In the "New Java Class" window, write down your class name, e.g."Lab" and check the "public static void main(String[] args)"
 
+
[[Image:eclLab1_2.jpg|400px ]]
  
 
<br/>The following code will be the content of the Lab1_1 class.
 
<br/>The following code will be the content of the Lab1_1 class.
 +
[[Image:eclLab1_3.jpg|500px ]]

Latest revision as of 11:12, 24 January 2011

5. Creating a java class
Go to the "src" folder in your package and right click on it, then select: New -> Class

EclLab1 1.jpg


In the "New Java Class" window, write down your class name, e.g."Lab" and check the "public static void main(String[] args)"

EclLab1 2.jpg


The following code will be the content of the Lab1_1 class.

EclLab1 3.jpg