Ask Question
4 July, 01:52

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. 4 July, 05:00
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers