Debugging
Lesson 1 of 1
  1. 1
    “First actual case of bug being found.” The story goes that on September 9 th , 1947, computer scientist Grace Hopper found a moth in the Harvard Ma…
  2. 2
    When we are writing Java programs, the compiler is our first line of defense against errors. It can catch syntax errors. Syntax errors represent grammar errors in the use of the programming lang…
  3. 3
    If our program has no compile-time errors, it’ll run. This is where the fun really starts. Errors which happen during program execution (run-time) after successful compilation are called run-time …
  4. 4
    In the last exercise when we were dealing with run-time errors, you might’ve noticed a new word in the error message: “Exception”. Java uses exceptions to handle errors and other exceptional eve…
  5. 5
    Exception handling is an essential feature of Java programming that allows us to use run-time error exceptions to make our debugging process a little easier. One way to handle exceptions is using …
  6. 6
    Once we have removed the syntax errors and run-time errors, the program runs successfully. But sometimes, the program still doesn’t do what we want it to do or no output is produced. Hmmm… These t…
  7. 7
    If you have examined the code thoroughly, and you are sure the compiler is compiling the right source file, it is time for desperate measures: 1. Divide and conquer: Comment out or temporarily…
  8. 8
    Finding bugs is a huge part of a programmer’s life. Don’t be intimidated by them… embrace them. Errors in your code mean you’re trying to do something cool! In this lesson, we have learned about t…

What you'll create

Portfolio projects that showcase your new skills

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory