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…


This content originally appeared on DEV Community and was authored by Milena

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


This content originally appeared on DEV Community and was authored by Milena


Print Share Comment Cite Upload Translate Updates
APA

Milena | Sciencx (2022-06-15T02:15:00+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 ,<https://www.scien.cx/2022/06/15/1-30-days-of-java/>
VANCOUVER
Milena | Sciencx - » 1/30 days of Java. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/06/15/1-30-days-of-java/
CHICAGO
" » 1/30 days of Java." Milena | Sciencx - Accessed . 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: ]
rf:citation
» 1/30 days of Java | Milena | Sciencx | https://www.scien.cx/2022/06/15/1-30-days-of-java/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.