Given the String variable address, write an expression that returns the position of the first occurrence of the String “Avenue” in address.

2
Given the String variable address, write an expression that returns the position of the first occurrence of the String “Avenue” in address.

LANGUAGE: JAVA

CHALLENGE:

Given the String variable address, write an expression that returns the position of the first occurrence of the String “Avenue” in address.

SOLUTION:


address.indexOf("Avenue")

2 comments

Add comment