Casting to a New Type : Data Type « JSP « Java






Casting to a New Type

<HTML>
  <HEAD>
    <TITLE>Casting to a New Type</TITLE>
  </HEAD>

  <BODY>
    <H1>Casting to a New Type</H1>
    <%
        float float1;
        double double1 = 1;

        float1 = (float) double1;

        out.println("float1 = " + float1);
     %>
  </BODY>
</HTML>

           
       








Related examples in the same category

1.double: Finding Average Grades
2.An Automatic Data Conversion
3.Scriptlet Example