Back
Close

Beginner Java Concepts

a-Rye
5,663 views

Debugging

There are many things that can go wrong when programming. In Computer Science, we call these "bugs." The most basic categories of bugs are Syntax and Logic bugs. In Java, indentation (or any whitespace really) won't affect if your code compiles or not. However, it is good practice to organize your code with proper spacing.

Syntax is where you have a typo in your code. This could be forgetting a semi colon (;), curly bracket ({}), or any other symbol required for the code to be compiled.

You could be missing a curly bracket:

public static void main(String[] args) 

    System.out.println("Hello World!");

}

Or missing a semi colon:

public static void main(String[] args) {

    System.out.println("Hello World!")

}

Or misspelling a keyword:

pablic statoc vid main(String[] args) {

    System.out.println("Hello World!");

}

Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants