stinkle Posted November 23, 2007 at 11:07 AM Report Share #149610 Posted November 23, 2007 at 11:07 AM Não consigo utilizar o método hasNextString() Excerto: while (linha[i].hasNextString()){ Word[] palavra = new Word(linha[i].nextString(), i, posicao); posicao++; } Dá-me o seguinte erro: Text.java:16: cannot find symbol symbol : method hasNextString() location: class java.lang.String while (linha[i].hasNextString()){ ^ Alguém me pode ajudar. PS- estou a ter o mesmo problema com o método nextString(). Link to comment Share on other sites More sharing options...
javanoob Posted November 23, 2007 at 02:31 PM Report Share #149654 Posted November 23, 2007 at 02:31 PM Pode não ter nada a ver, mas assim como ninguém quer a coisa... meteste lá o: import java.util.Scanner; ? Link to comment Share on other sites More sharing options...
magician Posted November 23, 2007 at 03:03 PM Report Share #149660 Posted November 23, 2007 at 03:03 PM A questão é a Class Word tem o método hasNextString ? I haven’t lost my mind; it’s backed up on DVD somewhere! Link to comment Share on other sites More sharing options...
stinkle Posted November 23, 2007 at 06:43 PM Author Report Share #149725 Posted November 23, 2007 at 06:43 PM ja está resolvido. Pensei que o método hasNextString fizesse parte da classe util.String (que não é preciso importar). Link to comment Share on other sites More sharing options...
Betovsky Posted November 23, 2007 at 06:47 PM Report Share #149730 Posted November 23, 2007 at 06:47 PM Agora fiquei curioso. O que era suposto fazer o método hasNextString numa String? Visto que a String é apenas uma e só uma. "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now