If you look at the JDK API docs:
http://java.sun.com/j2se/1.3/docs/api/index.html
You will notice that Integer.valueOf() returns a new Integer object
initialized to the value of the specified String. You're attempting to
assign an Object to an int and that's why you get the error.
What you probably want is Integer.intValue() which returns the value of this
Integer as an int.
Justy
----- Original Message -----
> Sometimes the simplest things cause the most problems...
>
> The following code is giving me problems:
>
> for (int t = Integer.valueOf("minModStr"); t <= 25; t++) {
> out.println("<h2>" + t + "</h2>");
> }
>
> The error it returns is:
>
> Error: The type of the left-hand side in this assignment, "int", is not
> compatible with the type of the right-hand side expression,
> "java/lang/Integer".
>
> I have tried to declare t as Integer, but doing that gives
>
> Error: The type of this expression, "Integer", is not numeric.
>
> Hay-ulp.
>
> - James
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets