You can run the code you have so far, and turn it into a programme. It doesn't do anything, but it will still compile. So let's add one line of code just so that we can see how it works.
We'll output some text to a console window. Add the following line to your main method:
public static void main( String[ ] args ) {
System.out.println( "My First Project" );
}
When you type the full stop after "System", NetBeans will try to help you by displaying a list of available options:



OK, we can now go ahead and test this programme out. First, though, save your work. You can click File > Save, or File > Save All. Or click the Save icon on the NetBeans toolbar.
To end this section, click below to learn how to share your Java programmes with others.
0 comments:
Post a Comment