#Help..
80 messages · Page 1 of 1 (latest)
i know im gonna make it for lowercase too but it doesnt work..
for B
Did you get any error?
Post the full code
ummm naaah but im gonna send it wait
Why..
Also try with
word.indexOf(i).equalsIgnoreCase("b")
and counter didnt work idk did u notice, there were 2 B in there
oh im beginner and tomorrow i have an exam
i cant use some methods like that..
Ohhhhh
No wait
Dont do anything i got it lmao
LOOL
okay im waiting!!
So, because you added an else statement that breaks the for loop when a b its not found, then your loop will just stop instantly and won't check any further
Jist delete the else statement
And you are good to go
okaaay i trust u
now what we gonna do
Also to catch both uppercase and lowercase you can use word.toLowerCase() to do the thing you need
Just run
It will work
You will get 2
no..
How did it go?
it didnt work
Send the code
The code in text
The stuff inside the class
okayy
i feel like im dumb
BRUH
You had to delete the WHOLE else block
Its the break that makes the for loop stop
but it should say "no letter B" when kicking it from the system
Just delete System.out.println("there is no B") and the break
It will work
it works..
but if the user enters a string without the letter B
counter will be 0 okay
but system have to say sth to user
Just make an if after the loop
if(counter1==0) System.out.println("no B sorry") ;
oh my gosh
im laughing
ur genius
HAHAHHAHAHA
LOOOOOOOOL
OH MY GOD
IM GONNA CRY
ITS 2 AM
AND MY BRAIN IS SLEEPING
I mean its ok stumbling against walls at the beginning, you will do it forever
HAHAHAHAHA OH MY
Get some sleep
no i have to pass this exam..
Here is about to become 00:00 im just up so i can say happy birthday to a friend
wow
ur so kind
Man your health should5be top priority, you can't function at top function if your brain doesn't sleep enough you know?
Function at top function
y ur so right
STOP MAN DONT SAY ANYTHING
I guess i am crossin the "its late go to sleep brain" line
DONT BE RIGHT ANYMORE
HAHAHAHAHAHA
Btw if you need help feel free to dm im always happy to help
ur so kind
thank you..
And i answer when i get online, even tho im not much online
U welcome
now
im gonna delete this question bcz it solved
Yeah got to sleep too
thank you again genius impressive man