Results 1 to 2 of 2
  1. #1
    paulo.park is offline Member
    Join Date
    Sep 2010
    Rep Power

    Default problemas com conversão de string para int

    Eu preciso fazer o calculo de uma area, eu fiz a conversão de string para int.
    porém preciso fazer o calculo multiplicando a base pela altura armazenando no resultado e depois mostrar os dados.

    <h1>Resultado do cálculo</h1>

    String base = request.getParameter("base");
    String altura = request.getParameter("altura");
    int resultado;

    base = new Integer(base).toString();
    altura = new Integer(altura).toString();

    resultado = base * altura;


  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    Please try using the Google translate page so you can post English. Not too many of us understand Portuguese.

    Here is what I get using the translator:

    Do I need to calculate an area, I did the conversion from string to int. but need to do the calculation by multiplying the base by the height storing the result and then show the data.

Similar Threads

  1. Replies: 9
    Last Post: 04-23-2010, 02:52 AM
  2. Replies: 7
    Last Post: 11-03-2009, 03:18 AM
  3. combine string[] into string like perl's join function
    By tekberg in forum Advanced Java
    Replies: 9
    Last Post: 02-23-2009, 02:05 PM
  4. Replies: 5
    Last Post: 01-11-2009, 11:12 AM
  5. Replies: 0
    Last Post: 11-20-2007, 05:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts