title: Perfect square if,else
body: <p>having trouble with perfectsquare code </p>
  
  <pre><code>import java.util.*;
  
  
  public class perfectsquare {
  
      /**
       * @param args
       */
      public static void main(String[] args) {
          // TODO Auto-generated method stub
  
  Scanner s= new Scanner(System.in); 
  double number; 
  
  System.out.println("Enter number &gt;");
  
  number= s.nextDouble();
  
  System.out.println(Math.sqrt(number));
  
  
  
  
  
      }
  
  }
  </code></pre>
  
  <p>Using if,else how could you make it return a perfect square like sqrt of 9=3 but false if the square root of that number is a decimal for example squareroot of 10 would be 3.122222.....</p>