Write a static method that receives a String. It should return true
if the string begins with the letter 'x' (lowercase or capital).
You must use .substring()
.
Examples:
startsWithX("x-men")
returns true
startsWithX("X-Men")
returns true
startsWithX("The Incredible X-Men")
returns false
startsWithX("")
returns false
startsWithX("xOxOx")
returns true
©2003–2016 Graham Mitchell
This assignment is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.