#Am i noob or is it weird output?

1 messages ยท Page 1 of 1 (latest)

simple vector
acoustic radishBOT
#

<@&987246399047479336> please have a look, thanks.

upbeat hare
#

What does GlobalInterface look like?

simple vector
#

/**

  • GlobalInterface
    */
    public interface GlobalInterface {

    int bankBalance = 0;
    int points = 0;
    }

#

I am a beginner so please bear with my dumbness! ๐Ÿ˜ข

#

@upbeat hare

feral beacon
#

u dont have a toString override so u cannot expect the output u want ๐Ÿ˜‰

vernal mulch
#

I didn't use visual studio code, but have you made sure the files have been saved after you've made your changes?

simple vector
#

yea

#

@vernal mulch

vernal mulch
#

could you write ls in your terminal?

wanton blaze
#

You only compiled Main.java. Could the others have previously been compiled with differing content?

simple vector
simple vector
vernal mulch
#

there's a Main.class and main.class - could this be an issue?

wanton blaze
#

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.

simple vector
#

lol

#

how dumb can i be

#

Certified Dumb person lol

#

๐Ÿ˜‚

wanton blaze
#

An easy mistake that a good IDE would have warned you about.

simple vector
#

means vs code is not a good IDE?

upbeat hare
#

It's not even really an IDE

wanton blaze
#

VS Code is a Text Editor that has been taught some tricks.

simple vector
#

they said its editor fuck

vernal mulch
#

As I didn't use VSCode, I am curious - what will happen if your press run?

upbeat hare
#

Heh, it's a common miscall to name it an IDE; it's just a very modular text editor.

simple vector
#

instead of doing javac and java

#

scroll down download intellij community edition

vernal mulch
#

And it will run with 10 or 90 as the output?

upbeat hare
#

I was just about to link it

simple vector
#

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

wanton blaze
#

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.

simple vector
#

I mean the tab completions are great from Ultimate if u are familiar with basic syntax

vernal mulch
#

Ultimate has the AI code completion bundled-in, right?

simple vector
#

thanks guys for the help ! will be posting more dumb post

wanton blaze
#

If you're doing Spring (Boot or otherwise) development I recommend it though.

simple vector
#

i mean we all made dumb posts at some point ๐Ÿคท

upbeat hare
#

It's part of the progress.

simple vector
#

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

honest loom
#

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

simple vector
#

HTML, Js, Python^

honest loom
#

for java however its not really good

upbeat hare
#

Anything compiled id say it sucks.

honest loom
#

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)

feral beacon
#

also the e doesnt stand for editor in IDE, vsc is a good text editor, ( integrated development enviroment )