u/South_Alarm_4583

Java Test

guys i have a final tmrw, and there's this question that i'm stuck on. I'm pretty bad at java so plz be nice, i usually use the questions and search up the answer for now to understand the context, and for this question chat gpt keeps saying the answer is XXX, but it's not true.

What is the output of this Java fragment:

int а = -4;
double y = а / 3 + a;
System.out.println(у);

(Write XXX in case of errors.)

any help would be appreciated, also, any studying strategy to do good on the final for tmrw would also be appreciated...

it's a intro to object oriented programming course...

Thanks a bunch!

reddit.com
u/South_Alarm_4583 — 5 days ago