Ask Question

Unlike the String class where you must pass a message to an object (instance) of the class, as in x. length (), in order to use the Math class, you pass messages directly to the class name, as in Math. abs () or Math. sqrt ().

A. True

B. False

+4
Answers (1)
  1. 12 May, 21:04
    0
    True

    Explanation:

    This is true. Consider this Java Statement

    String string = new String ("Hello");

    In other pass pass any message to this String object string, the method must be called on the String object using the dot operator for example, the length method string. length (); the equals method string. equals () and several others. This is different when using the Math class, since the Math class belongs to the package java. lang it is static imported.

    Static import implies that the members of a class are used in the code without creating instance variables, unlike the string where the message must be passed to the object instance
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Unlike the String class where you must pass a message to an object (instance) of the class, as in x. length (), in order to use the Math ...” 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.
Search for Other Answers