1. Learn
  2. /
  3. Courses
  4. /
  5. Intermediate Java

Connected

Exercise

Security checking

You want to make sure that the site you are trying to visit is secure. All websites which try to be secure start with https://. Those that don't start with http:// (notice the absence of the s).

Instructions

100 XP
  • Assign the correct index of the character 's' in the url string to the variable charPosition.
  • Use the appropriate String method on the url string to extract the character at that position and print it.