From the course: Learning Java 11
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Debugging syntax and logical errors - Java Tutorial
From the course: Learning Java 11
Debugging syntax and logical errors
- [Instructor] When we are writing code sometimes we can make a mistake and get an error. These errors can cause our code to give the wrong output or crash our program entirely. And you've probably already experienced a little bit of this in the course so far. You may have heard of the term debugging before. And this process involves locating and correcting code errors in your program. We often call these errors bugs, because computer scientist pioneer Grace Hopper coined the term bug when she found a moth causing an error in her early computer. In this chapter we'll look at some strategies for how to debug your programs and how to fix some common errors. Before we can solve errors, we have to understand how our program is executing code so that we can find them. One way we can understand how our program is working more fully and locate an error is by using print statements. In this lesson, we'll take a look at our multiple choice program from the last chapter, but with a few errors…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.