Get rid of the labels in the isSubstringPresent method, but preserve its logic.
The method returns true if substring is a substring of string, otherwise false.
The code should not have break and continue statements.
Getting rid of labels
- 16
Locked
Comments (4)
- Popular
- New
- Old
You must be signed in to leave a comment
Justin Smith
28 March 2022, 23:18
LOL, this is laughably easy to pass using Java's built-in String.contains method. I'm surprised the validation lets you do it.
+1
matemate123
24 May, 17:03
Haha, I forgot about this method. What's worse is that I used it a couple of days ago and relied on a counter to solve this task.
-_-
0
dnlklnhfr
4 August 2020, 18:11
@CodeGym:
There's a typo in requirement #2.
Should be "[...] must return false if substring is NOT a substring of string."
0
Roman
7 August 2020, 06:14
Thanks, it will be fixed soon
+1