u can use long also. since it's phone number, no decimal involve.
Denis wrote:
> Use a double instead
>
> -----Original Message-----
> From: greg@c... [mailto:greg@c...]
> Sent: Wednesday, August 15, 2001 1:44 PM
> To: Pro_JavaServer_Pages
> Subject: [pro_jsp] Re: Error in code
>
> That means 9811299109 can not be an int for it is greater than
> 2147483647 ...
>
> ----- Original Message -----
> From: Jagdeep Nagdev <jeetu248@y...>
> To: Pro_JavaServer_Pages <pro_jsp@p...>
> Sent: Wednesday, August 15, 2001 7:32 PM
> Subject: [pro_jsp] Error in code
>
> > Hi guys!!
> > I am new to JSP and have written the following
> > simple code which i am sending
> >
> > <HTML>
> > <HEAD><TITLE>DISPLAYING A TABLE</TITLE></HEAD>
> > <BODY>
> > <%! String[] Names = {"Saurabh","Monika",
> > "Sanjeev", "Sandeep", "Swati"};
> > int[] PhoneNos
> > {4124988700,9811299109,4129739842,4124985454,9810411186};
> > %>
> > <TABLE BORDER = "2" ALIGN = "center">
> > <TH>NAME</TH>
> > <TH>TELEPHONE NUMBER</TH>
> > <%for (int i=0;i<5;i++) {%>
> > <TR>
> > <TD><% = Names[i]%></TD>
> > <TD><%= PhoneNos[i]%>
> > </TR>
> > %>
> > </TABLE>
> > </BODY>
> > </HTML>
> >
> > But it gives me the following error.
> >
> >
> > Error: 500
> > Location: /examples/disp_table.jsp
> > Internal Servlet Error:
> >
> > org.apache.jasper.JasperException: Unable to compile
> > class for
> >
> JSPD:\tomcat1\jakarta-tomcat-3.2.1\work\localhost_8080%2Fexamples\_0002f
> disp
> _0005ftable_0002ejspdisp_0005ftable_jsp_0.java:19:
> > Integer literal out of range. Decimal int literals
> > must be in the range -2147483648 to 2147483647.
> > int[] PhoneNos
> > {4124988700,9811299109,4129739842,4124985454,9810411186};
> > ^