A

Admin • 831K Points
Coach

Q. What is the correct way to check if a string starts with a specific prefix in Java?

  • (A) str.startsWith(prefix)
  • (B) str.beginsWith(prefix)
  • (C) str.starts(prefix)
  • (D) str.hasPrefix(prefix)
  • Correct Answer - Option(A)
  • Views: 24
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.