#skill rack!!!!!!!!
1 messages ยท Page 1 of 1 (latest)
hellloo
int A = String[] parts = sc.nextLine().split(":"); is not valid
you can't assign an int to a String[]
remember to read the code "int A equals String[]" doesn't make sense right?
Bruhh actually this is a practicing webstie my college gave me.. we can only change the blanks
i cant modilfy any other
thats the problem.. '
the 3 boxes..
helloo..??
here is a clear image
so if the input is 54 : 6
what you have to do is read each part using the scanner
the scanner will read each segment
do you know how to read a number using a scanner?
What other methods can you use with scanner?
yahh i know those.. nut ...here its expection some other different answer
declaration: module: java.base, package: java.util, class: Scanner
int number = scanner.nextInt();
exactly!
so that's how you will read the numbers A and B
but wait we have a : in the middle
but thankfully there's a "blank" in your thingy to consume that as well
look at the website Surly sent, which method do you think is best to consume the :?
sTaRts with the letter 'n'
nextLine()??
that will read the line, we just want the :
I dont know guyss... can u guyss pls say it directly pls
it's on the website!
hint: look under "all methods"
actually skip seems a better choice
it won't work
@mild basin it won't work because the next char is actually a whitespace
and nextInt won't match if it's not got any spaces
did none of the methods make sense? ๐
ah he rage quit
So impatient, so much life to live.
did i do it bad? ๐
nope
oof
maybe explain that the rest of string is "still in the pipe"
well he's gone
Weird way to force kids to program though