+ 2

Need help with some java codding

Hello, I have just started learning java and I am new to all the coding stuff. I wrote a java program just for practicing a little bit. https://code.sololearn.com/cKZp5EI8toiE/?ref=app I was wondering how to make a loop so that the program won't stop just after a single user command. I tried looping using while(true){...........} but it created infinite number of outputs. So anybody could please help me 🙏🙏🙏

23rd Feb 2019, 6:44 PM
Antarip
Antarip - avatar
3 Respostas
+ 4
hi Antarip is this code what you want? https://code.sololearn.com/cjVNFRCwAIvH/?ref=app i hope this helps
23rd Feb 2019, 7:36 PM
Ollie Q
Ollie Q - avatar
+ 1
Thanks 😄😄😄 Yes, this is what I wanted.
23rd Feb 2019, 10:27 PM
Antarip
Antarip - avatar
+ 1
A better way to do it so you can write the whole word for example ''good morning'' https://code.sololearn.com/cFMJU96gs0Fi/#java
23rd Feb 2019, 10:52 PM
JavaBobbo
JavaBobbo - avatar