title: possible loss of precision error in java
body: <p>This is my code:</p>
  
  <pre><code>class test{
  
      public static void main(String arg[]){
  
          int a=10, b=20;
          float c = 30.123;
          int e = (int)c;
          System.out.println(e);
  
      }
  }
  </code></pre>
  
  <p>I'm getting this error:</p>
  
  <pre><code>test.java:6: error: possible loss of precision
          float c = 30.123;
                    ^
  required: float
  found:    double
  1 error
  </code></pre>
  
  <p>Why all these?</p>