Se bem me lembro, o nextDouble() nao arranca fora o <enter> que vc digita e
o enter permanece no Buffer do Scanner, ai no começo do proximo loop o
nextLine() vai pegar só esse <enter>..
Provavelmente se vc por um sc.nextLine() depois de ler o ultimo double
resolva, mas nao sei se isso vai ser considerado gambiarra =P

Em 11 de abril de 2010 16:51, Guto <[email protected]> escreveu:

> vc tá dando 2 enter's no final da entrada de dados de cada aluno?
> e no metodo atulizar aluno? vc usa system.in?
>
> Em 11 de abril de 2010 16:28, João Lucas Nery Dantas 
> <[email protected]>escreveu:
>
> Exato.
>> Fica com se estivesse vazio o nome.
>>
>> Em 11 de abril de 2010 16:26, Guto <[email protected]> escreveu:
>> > nao entendi mto bem seu problema...
>> > pelo que entendi qnd vc roda o prog os dados do primeiro aluno vc
>> consegue
>> > completar sem problemas. do segundo em diante vc nao consegue entrar com
>> o
>> > nome. é isso?
>> > e se vc ignorar o nome e digitar os cpf's e dre's, o prog termina de
>> rodar
>> > sem erros?
>> > Em 11 de abril de 2010 16:14, João Lucas Nery Dantas <[email protected]>
>> > escreveu:
>> >>
>> >> Sim.
>> >>
>> >> Ta ai o codigo: http://pastebin.com/qzuTsrhw
>> >>
>> >>
>> >> Em 11 de abril de 2010 16:08, Guto <[email protected]> escreveu:
>> >> > pode postar o codigo todo? como vc declarou turma[]? vc instanciou
>> cada
>> >> > elemento de turma[]?
>> >> >
>> >> > Em 11 de abril de 2010 16:05, João Lucas Nery Dantas <
>> [email protected]>
>> >> > escreveu:
>> >> >>
>> >> >> Ah sim!
>> >> >> Mas fiz essa mudança e continua o mesmo problema. =/
>> >> >>
>> >> >>
>> >> >> Em 11 de abril de 2010 15:57, Zaedy Sayão <[email protected]>
>> >> >> escreveu:
>> >> >> > Haha, nem tinha visto isso. Isso q da, fui olhar esse negocio do
>> cara
>> >> >> > ontem
>> >> >> > de madrugada....hehe
>> >> >> >
>> >> >> > Mas nao declare mesmo variaveis dentro do loop nao cara, a nao ser
>> >> >> > variaveis
>> >> >> > contadoras ou algo muito especifico....
>> >> >> >
>> >> >> > []'s
>> >> >> >
>> >> >> > 2010/4/11 Guto <[email protected]>
>> >> >> >>
>> >> >> >> O erro que deve estar dando é devido a isso mesmo. Na verdade no
>> >> >> >> primeiro
>> >> >> >> loop tudo funciona normal. Mas no segundo ele tenta criar uma
>> >> >> >> variavel
>> >> >> >> com
>> >> >> >> um nome que já existe. aí que dá o erro.
>> >> >> >> Basta vc mover as linhas onde vc declara as variaveis pra antes
>> do
>> >> >> >> for.
>> >> >> >>
>> >> >> >> Em 11 de abril de 2010 15:51, Guto <[email protected]>
>> >> >> >> escreveu:
>> >> >> >>>
>> >> >> >>> Você ta declarando as variaveis dentro do loop. É isso mesmo que
>> vc
>> >> >> >>> quer?
>> >> >> >>>
>> >> >> >>> Em 11 de abril de 2010 15:24, João Lucas Nery Dantas
>> >> >> >>> <[email protected]>
>> >> >> >>> escreveu:
>> >> >> >>>>
>> >> >> >>>> A partir do segundo loop ele pula o nome, e vai direto pedindo
>> o
>> >> >> >>>> cpf.
>> >> >> >>>> Assim :
>> >> >> >>>>
>> >> >> >>>> "
>> >> >> >>>> Digite a segunda nota do Aluno 1 :
>> >> >> >>>> 1
>> >> >> >>>> Digite o nome do Aluno 2 :
>> >> >> >>>> Digite o CPF do Aluno 2 :
>> >> >> >>>> dsadsdsdsds
>> >> >> >>>>
>> >> >> >>>> "
>> >> >> >>>>
>> >> >> >>>> Nao da pra por o nome a partir do segundo loop.
>> >> >> >>>>
>> >> >> >>>> Abs.
>> >> >> >>>>
>> >> >> >>>> Em 11 de abril de 2010 14:42, Zaedy Sayão <[email protected]
>> >
>> >> >> >>>> escreveu:
>> >> >> >>>> > Eu olhei e nao entendi seu problema.
>> >> >> >>>> >
>> >> >> >>>> > Aparentemente ta tudo ok com seu codigo....
>> >> >> >>>> >
>> >> >> >>>> > []'s
>> >> >> >>>> >
>> >> >> >>>> > 2010/4/11 João Lucas Nery Dantas <[email protected]>
>> >> >> >>>> >>
>> >> >> >>>> >> Outra dúvida que apareceu aqui na minha execução.
>> >> >> >>>> >> http://pastebin.com/qdGM0bWi
>> >> >> >>>> >> Ao executar essa parte, ele faz o primeiro loop, só que a
>> >> >> >>>> >> partir
>> >> >> >>>> >> do
>> >> >> >>>> >> segundo, aparece a mensagem requisitando o nome e logo após
>> >> >> >>>> >> requisitando o CPF, não dando oportunidade para entrar com o
>> >> >> >>>> >> nome.
>> >> >> >>>> >> Me disseram que tem a ver com o Enter. Não estou conseguindo
>> >> >> >>>> >> detectar
>> >> >> >>>> >> esse
>> >> >> >>>> >> erro.
>> >> >> >>>> >>
>> >> >> >>>> >> Se alguém puder ajudar!
>> >> >> >>>> >>
>> >> >> >>>> >> Abs
>> >> >> >>>> >>
>> >> >> >>>> >>
>> >> >> >>>> >>
>> >> >> >>>> >>
>> >> >> >>>> >>
>> -----------------------------------------------------------------------------------------------------------
>> >> >> >>>> >>
>> >> >> >>>> >> Repitindo minha duvida ! rs
>> >> >> >>>> >>
>> >> >> >>>> >>
>> >> >> >>>> >> Em 11 de abril de 2010 14:25, Zaedy Sayão <
>> [email protected]>
>> >> >> >>>> >> escreveu:
>> >> >> >>>> >> > Qual dificuldade q vc tem para passar a nota?
>> >> >> >>>> >> >
>> >> >> >>>> >> > []'s
>> >> >> >>>> >> >
>> >> >> >>>> >> > 2010/4/11 Renan Machado <[email protected]>
>> >> >> >>>> >> >>
>> >> >> >>>> >> >> eu perguntei se podia fazer um construtor com as notas pq
>> eu
>> >> >> >>>> >> >> estou
>> >> >> >>>> >> >> encontrando dificuldades na hora de passar as notas para
>> o
>> >> >> >>>> >> >> método
>> >> >> >>>> >> >> que
>> >> >> >>>> >> >> eu criei pra calcular as médias . Tem alguma outra
>> >> >> >>>> >> >> alternativa
>> >> >> >>>> >> >> para
>> >> >> >>>> >> >> esse problema ?
>> >> >> >>>> >> >>
>> >> >> >>>> >> >> --
>> >> >> >>>> >> >> You received this message because you are subscribed to
>> the
>> >> >> >>>> >> >> Google
>> >> >> >>>> >> >> Groups
>> >> >> >>>> >> >> "Comp 2 - Geral" group.
>> >> >> >>>> >> >> To post to this group, send email to
>> >> >> >>>> >> >> [email protected].
>> >> >> >>>> >> >> To unsubscribe from this group, send email to
>> >> >> >>>> >> >> [email protected]<comp2-geral%[email protected]>
>> .
>> >> >> >>>> >> >> For more options, visit this group at
>> >> >> >>>> >> >> http://groups.google.com/group/comp2-geral?hl=en.
>> >> >> >>>> >> >>
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> > --
>> >> >> >>>> >> > Zaedy Dantas Sayão
>> >> >> >>>> >> > Graduando em Ciência da Computação DCC/UFRJ
>> >> >> >>>> >> > http://www.manufato.com.br/
>> >> >> >>>> >> > MSN: [email protected]
>> >> >> >>>> >> >
>> >> >> >>>> >> > --
>> >> >> >>>> >> > You received this message because you are subscribed to
>> the
>> >> >> >>>> >> > Google
>> >> >> >>>> >> > Groups
>> >> >> >>>> >> > "Comp 2 - Geral" group.
>> >> >> >>>> >> > To post to this group, send email to
>> >> >> >>>> >> > [email protected].
>> >> >> >>>> >> > To unsubscribe from this group, send email to
>> >> >> >>>> >> > [email protected]<comp2-geral%[email protected]>
>> .
>> >> >> >>>> >> > For more options, visit this group at
>> >> >> >>>> >> > http://groups.google.com/group/comp2-geral?hl=en.
>> >> >> >>>> >> >
>> >> >> >>>> >>
>> >> >> >>>> >>
>> >> >> >>>> >>
>> >> >> >>>> >> --
>> >> >> >>>> >> João Lucas Nery Dantas
>> >> >> >>>> >> Tel: 8885-0596
>> >> >> >>>> >>
>> >> >> >>>> >> --
>> >> >> >>>> >> You received this message because you are subscribed to the
>> >> >> >>>> >> Google
>> >> >> >>>> >> Groups
>> >> >> >>>> >> "Comp 2 - Geral" group.
>> >> >> >>>> >> To post to this group, send email to
>> >> >> >>>> >> [email protected].
>> >> >> >>>> >> To unsubscribe from this group, send email to
>> >> >> >>>> >> [email protected]<comp2-geral%[email protected]>
>> .
>> >> >> >>>> >> For more options, visit this group at
>> >> >> >>>> >> http://groups.google.com/group/comp2-geral?hl=en.
>> >> >> >>>> >>
>> >> >> >>>> >
>> >> >> >>>> >
>> >> >> >>>> >
>> >> >> >>>> > --
>> >> >> >>>> > Zaedy Dantas Sayão
>> >> >> >>>> > Graduando em Ciência da Computação DCC/UFRJ
>> >> >> >>>> > http://www.manufato.com.br/
>> >> >> >>>> > MSN: [email protected]
>> >> >> >>>> >
>> >> >> >>>> > --
>> >> >> >>>> > You received this message because you are subscribed to the
>> >> >> >>>> > Google
>> >> >> >>>> > Groups
>> >> >> >>>> > "Comp 2 - Geral" group.
>> >> >> >>>> > To post to this group, send email to
>> >> >> >>>> > [email protected].
>> >> >> >>>> > To unsubscribe from this group, send email to
>> >> >> >>>> > [email protected]<comp2-geral%[email protected]>
>> .
>> >> >> >>>> > For more options, visit this group at
>> >> >> >>>> > http://groups.google.com/group/comp2-geral?hl=en.
>> >> >> >>>> >
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> --
>> >> >> >>>> João Lucas Nery Dantas
>> >> >> >>>> Tel: 8885-0596
>> >> >> >>>>
>> >> >> >>>> --
>> >> >> >>>> You received this message because you are subscribed to the
>> Google
>> >> >> >>>> Groups "Comp 2 - Geral" group.
>> >> >> >>>> To post to this group, send email to
>> [email protected].
>> >> >> >>>> To unsubscribe from this group, send email to
>> >> >> >>>> [email protected]<comp2-geral%[email protected]>
>> .
>> >> >> >>>> For more options, visit this group at
>> >> >> >>>> http://groups.google.com/group/comp2-geral?hl=en.
>> >> >> >>>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> --
>> >> >> >>> Guto Marzagão.
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> --
>> >> >> >> Guto Marzagão.
>> >> >> >>
>> >> >> >> --
>> >> >> >> You received this message because you are subscribed to the
>> Google
>> >> >> >> Groups
>> >> >> >> "Comp 2 - Geral" group.
>> >> >> >> To post to this group, send email to
>> [email protected].
>> >> >> >> To unsubscribe from this group, send email to
>> >> >> >> [email protected]<comp2-geral%[email protected]>
>> .
>> >> >> >> For more options, visit this group at
>> >> >> >> http://groups.google.com/group/comp2-geral?hl=en.
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Zaedy Dantas Sayão
>> >> >> > Graduando em Ciência da Computação DCC/UFRJ
>> >> >> > http://www.manufato.com.br/
>> >> >> > MSN: [email protected]
>> >> >> >
>> >> >> > --
>> >> >> > You received this message because you are subscribed to the Google
>> >> >> > Groups
>> >> >> > "Comp 2 - Geral" group.
>> >> >> > To post to this group, send email to [email protected]
>> .
>> >> >> > To unsubscribe from this group, send email to
>> >> >> > [email protected]<comp2-geral%[email protected]>
>> .
>> >> >> > For more options, visit this group at
>> >> >> > http://groups.google.com/group/comp2-geral?hl=en.
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> João Lucas Nery Dantas
>> >> >> Tel: 8885-0596
>> >> >>
>> >> >> --
>> >> >> You received this message because you are subscribed to the Google
>> >> >> Groups
>> >> >> "Comp 2 - Geral" group.
>> >> >> To post to this group, send email to [email protected].
>> >> >> To unsubscribe from this group, send email to
>> >> >> [email protected]<comp2-geral%[email protected]>
>> .
>> >> >> For more options, visit this group at
>> >> >> http://groups.google.com/group/comp2-geral?hl=en.
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Guto Marzagão.
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups
>> >> > "Comp 2 - Geral" group.
>> >> > To post to this group, send email to [email protected].
>> >> > To unsubscribe from this group, send email to
>> >> > [email protected]<comp2-geral%[email protected]>
>> .
>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/comp2-geral?hl=en.
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> João Lucas Nery Dantas
>> >> Tel: 8885-0596
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "Comp 2 - Geral" group.
>> >> To post to this group, send email to [email protected].
>> >> To unsubscribe from this group, send email to
>> >> [email protected]<comp2-geral%[email protected]>
>> .
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/comp2-geral?hl=en.
>> >>
>> >
>> >
>> >
>> > --
>> > Guto Marzagão.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Comp 2 - Geral" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to
>> > [email protected]<comp2-geral%[email protected]>
>> .
>> > For more options, visit this group at
>> > http://groups.google.com/group/comp2-geral?hl=en.
>> >
>>
>>
>>
>> --
>> João Lucas Nery Dantas
>> Tel: 8885-0596
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Comp 2 - Geral" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<comp2-geral%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/comp2-geral?hl=en.
>>
>>
>
>
> --
> Guto Marzagão.
>  --
> You received this message because you are subscribed to the Google Groups
> "Comp 2 - Geral" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<comp2-geral%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/comp2-geral?hl=en.
>



-- 
Jefferson Bandeira

-- 
You received this message because you are subscribed to the Google Groups "Comp 
2 - Geral" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/comp2-geral?hl=en.

Responder a