#find max value in array
1 messages · Page 1 of 1 (latest)
well, how do u call methods?
what are the two arguments the method wants from u?
could u elaborate what gives u trouble with that step please
whats unclear
like, go into details please. thanks
Just how to actually get it to work and its array and key
yeah but which part of it is unclear?
and can u answer my questions please
well, how do u call methods?
what are the two arguments the method wants from u?
im trying to figure out where ur stuck exactly
if u dont give me anything i have to assume this is ur very first java program, first day, and we have to start with hello world
ur saying u dont know how to call a method?
that confuses me bc apparently u have been calling methods before already
those print statements for example
they are all method calls
or that scanner nextInt() etc
thats all you calling methods
so whats unclear in calling that search method now
What to actually put it to get it to call and search for whatever number the user puts
maybe make an attempt and then we can take it from there if u cant explain urself yet?
dont do it all at once
step by step
lets first call the search method
no arguments provided yet
do u know how to do that?
just calling a method
well, great. so appartently u do know everything already
(or did AI write this?)
u might want to adjust that second print a bit
since the text doesnt really line up with what it does
(it doesnt print the position but the number u searched for)
but other than that, that code looks absolutely correct
well, the array is missing, i guess
but other than that
Yea array messed up
so. put the actual array there and ur golden
That?
just numbers
thats the array
see, it wants an array from u. an int[]:
not an int
but an int[]
so numbers
👌