title: Possible lossy conversion from double to float, given float values?
body: <p>if i'm not mistaken, "0.5" are decimal numbers; thus, making it a float value. but why is java telling me that it is a double?. the return statements are detected as errors by java, saying: "incompatible types:possible lossy conversion from double to float"</p>
  
  <pre><code>public float typeDmgMultiplr(String type,String type2){
          if(type.equalsIgnoreCase("grass")){
              if(type2.equalsIgnoreCase("grass"))
                  return 0.5;
              else if(type2.equalsIgnoreCase("poison"))
                  return 0.5;
              else if(type2.equalsIgnoreCase("fire"))
                  return 0.5;
              else
                  return 2.0;
          }
          else if(type.equalsIgnoreCase("fire")){
              if(type2.equalsIgnoreCase("grass"))
                  return 2.0;
              else if(type2.equalsIgnoreCase("poison"))
                  return 1.0;
              else if(type2.equalsIgnoreCase("fire"))
                  return 0.5;
              else
                  return 0.5;
          }
          else if(type.equalsIgnoreCase("water")){
              if(type2.equalsIgnoreCase("grass"))
                  return 0.5;
              else if(type2.equalsIgnoreCase("poison"))
                  return 1.0;
              else if(type2.equalsIgnoreCase("fire"))
                  return 2.0;
              else
                  return 0.5;
          }
          else{
              if(type2.equalsIgnoreCase("grass"))
                  return 2.0;
              else if(type2.equalsIgnoreCase("poison"))
                  return 0.5;
              else if(type2.equalsIgnoreCase("fire"))
                  return 1.0;
              else
                  return 1.0;
          }
  
      }
  </code></pre>