GettingStarted1
Some simple java exercises for getting accustomed to the Netbeans interface and simple java code.
Description: Some simple java exercises for getting accustomed to the Netbeans interface and simple java code.
Create a new Netbeans Project, name it GettingStarted1
Netbeans > file > new project > choose project: java application <next> Project Name: GettingStarted <finish>
Your screen will now look something like:
/////////////////////////////////////////////////////////
/*
* To Change this license header, Project Properties.
* To Change this template file, choose Tools | Templates
* and open the template in the editior.
*/
package gettingstarted1;
/**
*
*
* @author wwolfe3
*/
public class GettingStarted1 {
/**
* @param args the command line arguments
*/
public static void main (String[] args) {
//Your java code goes here
}
}
/////////////////////////////////////////////////////////This code will be delted and replaced with the code on the following page.
Delete all the above code, replace it with the follow code:
Type in code:
After clicking the green "Run" arrow on the menu bar you should get an output that looks like the follow (the computer will prompt you to enter a length → try 10)
Sample Output:
Last updated
Was this helpful?