Getting rid of labels

  • 16
  • Locked
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.
You can't complete this task, because you're not signed in.
Comments (4)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Justin Smith
Level 39 , Greenfield, USA, United States
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.
matemate123
Level 37 , Kraków, Poland
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. -_-
dnlklnhfr
Level 30 , Karlsruhe, Germany
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."
Roman
Level 41
7 August 2020, 06:14
Thanks, it will be fixed soon