Pergunta

I'm trying to generate a random number and if the value gotten from the jtable is a hyphen I want it to random again. I'm doing a do while loop however none of these while loops are working. I dont know what i'm missing? EDIT: Whoops I found out my fault, my action listener was running the wrong method that I created, thanks for help

Foi útil?

Solução

Make your parenthesis proper like below and run

randomNum = (int)(Math.random() * (stuTable.getRowCount() - 1));

check it out

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top