Download presentation
Presentation is loading. Please wait.
1
Developing Java Applications with NetBeans
2
Creating a new Project
3
Different kind of projects
4
The general project
5
Adding a new Java Class to the Project Produces this result
6
We can delete everything and leave just the following
package javaapplication1; Name of the project public class Main { Name of the class (file) public static void main(String[] args) { this is to mark the beginning of the instructions of the program } This marks the end of the program } This marks the end of the class
7
Compiling the application
8
Running the Application
9
The Output field
10
Compilation Errors
11
Changing the properties of the project
12
Adding classes from an external jar file
13
Selecting the file
14
The file containing the new classes will be added during compilation and execution
15
Telling the compiler to “import” a certain class from the jar file
At the top of the program you have to write import <package>.Console; Package is the name of the pacakge containing the classes (in this case, JConsole) package javaapplication1; import JConsole.*; public class Main { public static void main(String[] args) { Console c = new Console(); for (int i = 1; i <= 10; i++) for (int j = 1; j <= 10; j++) c.println(i+“ * “+j+” = “+i*j); }
16
For more programs you just need to add classes to the project
17
And give the name of the new class
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.