1/30 days of Java

In my first day of this challenge, I already found something that I did not know!

While I was coding and trying to solve this challenge, I did not know what was wrong, because it simply was not making any sense in my head. My problem was the following…

In my first day of this challenge, I already found something that I did not know!

While I was coding and trying to solve this challenge, I did not know what was wrong, because it simply was not making any sense in my head. My problem was the following: I had to create three variable. One for an integer value, other for a double value and the last one, for a string. I also had inputs for all of the them. The problem was that, the compiler was not reading the last input (nextLine) and I discovered that, for some reason, when the compiler starts getting the values, it jumps the nextLine command and to solve this, we need to convert it.

I am still researching and learning about this to know why and how it works, but, pretty exciting thus far.

For curiosity, this is how I was doing:
Java code

And this is how it works:
Java code


Print Share Comment Cite Upload Translate
APA
Milena | Sciencx (2024-03-28T22:57:03+00:00) » 1/30 days of Java. Retrieved from https://www.scien.cx/2022/06/15/1-30-days-of-java/.
MLA
" » 1/30 days of Java." Milena | Sciencx - Wednesday June 15, 2022, https://www.scien.cx/2022/06/15/1-30-days-of-java/
HARVARD
Milena | Sciencx Wednesday June 15, 2022 » 1/30 days of Java., viewed 2024-03-28T22:57:03+00:00,<https://www.scien.cx/2022/06/15/1-30-days-of-java/>
VANCOUVER
Milena | Sciencx - » 1/30 days of Java. [Internet]. [Accessed 2024-03-28T22:57:03+00:00]. Available from: https://www.scien.cx/2022/06/15/1-30-days-of-java/
CHICAGO
" » 1/30 days of Java." Milena | Sciencx - Accessed 2024-03-28T22:57:03+00:00. https://www.scien.cx/2022/06/15/1-30-days-of-java/
IEEE
" » 1/30 days of Java." Milena | Sciencx [Online]. Available: https://www.scien.cx/2022/06/15/1-30-days-of-java/. [Accessed: 2024-03-28T22:57:03+00:00]
rf:citation
» 1/30 days of Java | Milena | Sciencx | https://www.scien.cx/2022/06/15/1-30-days-of-java/ | 2024-03-28T22:57:03+00:00
https://github.com/addpipe/simple-recorderjs-demo