20221021153620 java netbeans ide tutorial

URL: Java NetBeans IDE Tutorial

1:26 ![[Pasted image 20221018204543.jpg]] Agenda

1: Netbeans IDE

2: Creating your first Java program - Creating a project - Creating a file/class - The main method - Printing text to the output window - Where are the Java files located?

3: Common features of Netbeans

3:52 ![[Pasted image 20221018204604.jpg]] A Java program consists of one or more dot Java files. In Java, files are also known as classes. A project is a collection of one or more Java files.

4:24 ![[Pasted image 20221018204609.jpg]] The NetBeans IDE is a software program used for developing and testing software applications. The start page is a generic introductory page that can be closed. The start page provides information on what is new in the current version of the software.

5:31 ![[Pasted image 20221018204638.jpg]] The project prompt will ask what kind of project you are creating. For this project, you want to select Java Application. Next, you will name the project. It is Java convention to capitalize the first letter of each word in the project name.

7:07 ![[Pasted image 20221018204649.jpg]] We are creating a class within a project. The class will be called HelloWorld. Same conventions as the project name.

7:54 ![[Pasted image 20221018204653.jpg]] Every Java file that you create is called a class. In this case, we are creating a class called HelloWorld. The name of the file needs to exactly match the name of the class.

8:35 ![[Pasted image 20221018204658.jpg]] Every Java program has to have a line that says "public static void main" followed by parentheses that include the word "string" and the square brackets, args. Then, curly brackets.

9:32 ![[Pasted image 20221018205548.jpg]] The output window is the place where the computer displays information that is the result of the program's execution. In this case, the program will print the text "Hello world" to the output window.

9:48 ![[Pasted image 20221018205621.jpg]] The way you run this program is you use the menu option "run file". As you can see, it printed "Hello, World!". It went to the next line and then it printed something like, "I ran my program successfully." It took very very little time. Great!

15:07 ![[Pasted image 20221018205637.jpg]] SOUT (System.out.printline) + TAB is a shortcut for printing lines of code in NetBeans.

15:56 ![[Pasted image 20221018205656.jpg]] Println means we go to the following line. Whereas just print doesn't move the output to the next line.

16:47 ![[Pasted image 20221018205704.jpg]] A debugger is a tool that allows you to run your program and step through your code line by line so you can see what line is being executed at a certain time.

18:12 ![[Pasted image 20221018205711.jpg]] The Tools option in NetBeans IDE allows you to change the appearance and behavior of the code editor, including features like code completion.

18:48 ![[Pasted image 20221018205205.jpg]] The auto pop-up completion window is a feature that shows everything that you could possibly put after a certain point in your code. This helps find specific functions or items. You can turn this feature off if you do not like it.


Last update: November 18, 2023
Created: October 12, 2023