#help with Indentation
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
ould be on the same line.
Indentation is important in programming because it helps make your code more readable and organized. In Java, indentation is typically done using spaces or tabs to create a visual hierarchy of your code.
In this case, the error message is telling you that the closing curly braces '}' should be on the same line as the code block they are closing. For example:
if (condition) {
// code block
}
In this example, the closing curly brace '}' is on the same line as the code block it is closing (the if statement).
Make sure to check your code for proper indentation and ensure that all opening and closing curly braces are on the same line as their respective code blocks. This will help improve the readability of your code and make it easier to debug any errors.
indentation is used to make your code more presentable and easier to understand
looks fine to me
my guess is that it wants
if (...) {
}
else {
}
or
if (...) {
} else {
}
and not
if (...) {
}
else {
}
this is just whatever autochecker you are going against
so there's nothing actually "wrong" with how i did it. its just the auto checker wanting me to do it EXACATLY how they want?
probably
ah okay, thank you so much i was sitting here confused wondering what i did wrong😅
I would check this style first to see if it works
Java isn't yaml, the indentation doesn't matter. In this case it's just a checkstyle rule to learn you a certain convention.
they wanted me to do it in this stlye it looks like. thank you all for the help. 🫶
just as a little bit of motivation: the reason a lot of people are militant about styleguides is that people like this exist
🤮
We dont know whats going on in everyones mind, some are straightforward and some are... ah, never mind
I need to know who did this
You just dropped a nuke on every person unlucky enough to click here