#Am i noob or is it weird output?
1 messages ยท Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
What does GlobalInterface look like?
/**
-
GlobalInterface
*/
public interface GlobalInterface {int bankBalance = 0;
int points = 0;
}
I am a beginner so please bear with my dumbness! ๐ข
@upbeat hare
u dont have a toString override so u cannot expect the output u want ๐
I didn't use visual studio code, but have you made sure the files have been saved after you've made your changes?
could you write ls in your terminal?
You only compiled Main.java. Could the others have previously been compiled with differing content?
yea i have compiled others before as well
there's a Main.class and main.class - could this be an issue?
Right. So javac will not recompile files that aren't mentioned, unless it can't find the class-file. So it could be using older versions of BankAccount and SaarBrucken
Ahh yes. and you run main not Main. Good spotting.
So several likely causes of surprising results.
An easy mistake that a good IDE would have warned you about.
means vs code is not a good IDE?
It's not even really an IDE
VS Code is a Text Editor that has been taught some tricks.
my uni lied about me
they said its editor fuck
As I didn't use VSCode, I am curious - what will happen if your press run?
Heh, it's a common miscall to name it an IDE; it's just a very modular text editor.
it will run
instead of doing javac and java
scroll down download intellij community edition
And it will run with 10 or 90 as the output?
I was just about to link it
i do have a premium version as well but i dont use ๐
hehe i win!
dumb me
oh def use it
tbh i dont recommend Intellij Ultimate if u are starter
it gives too many tab completions
I'd do that after getting through your current exercise. But yes, a proper Integrated Development Environment (like Intellij Community) will protect you from these mistakes (and add quite a bit more besides).
Ultimate is no more complex to use than Community. It's just unnecessary for small projects that aren't using any of the big-project frameworks.
I mean the tab completions are great from Ultimate if u are familiar with basic syntax
Ultimate has the AI code completion bundled-in, right?
thanks guys for the help ! will be posting more dumb post
If you're doing Spring (Boot or otherwise) development I recommend it though.
i mean we all made dumb posts at some point ๐คท
You ain't dumb, we all start somewhere.
It's part of the progress.
my uni is more dumb tbh
cause they teach 3 languages at the same time and assume us to make compiler with 3 weeks of java
vsc is a decent IDE for some languages, due to extremely good plugin support on some
most notably on the frontend side
but also smaller things
HTML, Js, Python^
for java however its not really good
Anything compiled id say it sucks.
id recommend having vsc or similar as secondary editor whenever u have to touch non-java things
(although that's also where intellij ultimate can shine, having really good support for non-java things as well)
also the e doesnt stand for editor in IDE, vsc is a good text editor, ( integrated development enviroment )