Ask Question
1 August, 05:07

The strPhone variable should contain only numbers and no dashes (-). An error message should display if there is a dash anywhere in the variable. Which of the following statements determines whether the variable contains a dash in order to display the message?

+3
Answers (1)
  1. 1 August, 09:01
    0
    Following are the code in the Java Programming Language.

    if strPhone. Contains ("-") = True then

    Explanation:

    In the following code, we check the condition through the if conditional statement is that if the variable "strPhone" contain dashes (-) by using the "Contains () " function is equal to True then it display the message and the variable "strPhone" contains the phone numbers. So, that's why the following If statement is correct.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “The strPhone variable should contain only numbers and no dashes (-). An error message should display if there is a dash anywhere in the ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers