title: Java How to chain with Math class
body: <p>I am at the very basics of learning Java, I have tried searching for this answer but maybe I do not know what I am searching for. 
  I want to perform multiple operations on a number, so far the only way I know how to do that is the have intermediate variables with operations performed one at a time. This can't be the best way. The following is code in my main method that I would love to have work:</p>
  
  <pre><code>  double sqrtAbsInput = promptForDouble("I can get the square root of the absolute value.");
    double sqrtAbsOutput = sqrtAbsInput.Math.abs().sqrt();
    System.out.println(sqrAbsOutput);
  </code></pre>
  
  <p><code>promptForDouble()</code> method returns a double, it is the second line that concerns me most. The error I get is </p>
  
  <blockquote>
    <p>"error: double cannot be dereferenced."</p>
  </blockquote>
  
  <p>I assume what's going on is the variable needs to be the argument of the <code>Math</code> class methods, but I understand it could also have to do with the variable being a primitive type.</p>