To check if a string s contains the prefix "Java", you may write A. if (s. startsWith ("Java")) ... B. if (s. indexOf ("Java") = = 0) ... C. if (s. substring (0, 4). equals ("Java")) ... D. if (s. charAt (0) = = 'J' && s. charAt (1) = = 'a' && s. charAt (2) = = 'v' && s. charAt (3) = = 'a') ...
+1
Answers (1)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “To check if a string s contains the prefix "Java", you may write A. if (s. startsWith ("Java")) ... B. if (s. indexOf ("Java") = = 0) ... ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Home » Computers & Technology » To check if a string s contains the prefix "Java", you may write A. if (s. startsWith ("Java")) ... B. if (s. indexOf ("Java") = = 0) ... C. if (s. substring (0, 4). equals ("Java")) ... D. if (s. charAt (0) = = 'J' && s. charAt (1) = = 'a' && s.