• Курсы
  • Компилятор кода
  • Обсуждения
  • Цены
  • Teams
Menu
0

How to repeatedly prompt the user until correct input is given - JAVA

i need to re-prompt the user everytime they input the wrong information. how do i do this? please help. https://code.sololearn.com/cSr9FMtv0u00/?ref=app https://code.sololearn.com/cSr9FMtv0u00/?ref=app

javainputloopswhilevalidate
14th Oct 2018, 5:25 AM
Enzo Cabrera
1 ответ
- 1
while(input!= desiredInput){ //ask for a input.. }
14th Oct 2018, 5:28 AM
Akib
Akib - avatar

Часто задают такие вопросы?

Учитесь эффективнее, бесплатно:

  • Введение в Python

    7.1M учащихся

  • Введение в Java

    4.7M учащихся

  • Введение в C

    1.5M учащихся

  • Введение в HTML

    7.5M учащихся

Смотреть все курсы
Актуальное сегодня
Best way to learn a new programming language fast?
3 Votes
Will i land a job
1 Votes
why is my leaderboard diferent than my brothers
0 Votes
Why we use oops in python rather than any function ?
1 Votes
Project ideas
1 Votes
someone helps how can i make two for loops over a 2d array in c ( i didn't learned pointers yet )
0 Votes
How do I solve all test cases for popsicles problem?https://www.sololearn.com/coach/3?ref=app
0 Votes
Do you think AI will replace programmers?
0 Votes
What do you think would be good for some new courses?
0 Votes
Question to sololearn
1 Votes