#Java input/output display
1 messages · Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
@grave surge did they teach u on where variables live in java programs ?
do u know on fields ?
so u havent seen anything like this?
class HelloWorld {
String foo;
int bar;
....
?
ok, then u need to read some more theory before u continue
your approach is on the good path, but due to limited knowledge u run into this problem
sec, il show the issue
if ( choice == 1 ){
....
String catName = input.nextLine()
}
variables are not by default whole class
so your catName is lost on next }
as your variable is declared in that scope { }
hava a little read on this on Mooc :
Helsingin yliopiston kaikille avoin ja ilmainen ohjelmoinnin perusteet opettava verkkokurssi. Kurssilla perehdytään nykyaikaisen ohjelmoinnin perusideoihin sekä ohjelmoinnissa käytettävien työvälineiden lisäksi algoritmien laatimiseen. Kurssille osallistuminen ei vaadi ennakkotietoja ohjelmoinnista.
( it will be in english, for some reason it always outputs on that langugae on discord )