quando tenho o código abaixo
[code]public class phraseomatic
{
public static void main (String args[])
{
String[] wordlistone = {“julio”,“andersonnnn”,“coelho”};
String[] wordlisttwo = {“anderson”,“oliveira”,“cachorro”};
String[] wordlistthree = {“roxo”,“ronaldo”,“zanata”};
int oneLength = wordlistone.length;
int twoLength = wordlisttwo.length;
int threeLength = wordlistthree.length;
int rand1 = (int) (Math.random() * oneLength);
int rand2 = (int) (Math.random() * twoLength);
int rand3 = (int) (Math.random() * threeLength);
String phrase = wordlistone[rand1] + " " + wordlisttwo[rand2] + " " + wordlistthree[rand3];
System.out.println("Precisamos de "+ phrase);
}
}[/code]
ali em cima quando declaro as variaveis do tipo String com os nomes Julio,andersonnnn,coelho
e depois eu coloco
int oneLength = wordlistone.length;
Isso quer dizer que os valores das variaveis String são transformados em numero, tipo Julio vai ser 0, andersonnnn vai ser 1, coelho vai ser 2 ???
É isso mesmo???
Obrigado
