To debug a program, let's open an existing project that I have provided in the exercise files folder called Grades. Now that we have the project setup, lets run it once without debugging turned on. As you can see, we have a problem with the logic in our program. It might not be obvious how to fix the program and that is where the debugger is a great tool to get familiar with!
- [Voiceover] One of the big benefits…of using an integrated development environment…is the ability to use the debugging tool.…Once you have your program complied successfully,…you can use the debugger to walk through the code…line by line, evaluating variables…as you go, making changes.…Let's take a look.…We're going to open an existing project…that I have provided in the exercise files folder…called Grades.…There are several ways to use existing code…in your NetBeans application.…In the exercise files folder,…I've only included the Java file…and not the entire project folder.…
So we need to create a new project in NetBeans.…Let's do that first.…File, New Project.…We wanna create a Java project…and we want it to be a Java application…so I'll click next.…And I'm gonna give it a name.…I'm gonna call it Grades.…I'm gonna leave the check mark…so it creates a main class, and click Finish.…NetBeans uses our code template…to provide us with a skeleton…of some of the code necessary to run the program.…Now we can do one of two things.…
- What is an IDE?
- Viewing and organizing files in an IDE
- Downloading and installing different IDEs
- Coding with shortcuts and autocompletion
- Using templates
- Finding and referencing files
- Debugging Java code in an IDE
Skill Level Beginner
1. A Quick Review of IDE Basics
2. NetBeans IDE
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.