Workbook 2.5
From the Java-Bootcamp-Resources
, open the Workbook 2.5
folder.
JavaGram
In this workbook, you will create a sign-up
page for JavaGram!
Careful from the Incoming Trap!
You will encounter the nextLine()
trap when picking up the username.
nextLine() Trap | |
---|---|
Pitfall | nextLine() gets skipped when placed after nextInt() , nextDouble() , or nextLong() . |
Solution | Add an extra nextLine() before the "real" nextLine() . |
Explanation | The upcoming lesson on Delimiters will explain why this happens. |
Task 1
Use Scanner to pick up each response.
Task 2
Print the data that you picked up.
Notice how it prints in a nice format. \n
inserts a new line.
\t
inserts a tab of space.
Result
Solution
The code solution is beside the starter project.
The video solution is inside the appendix (last section on Udemy).
Good Luck!
Associated Course: The Complete Java Development Bootcamp
Related Course: The Complete Spring Boot Development Bootcamp – Become a Java Web Developer
Feedback Summary
4.7
43 students
5
91%
4
2%
3
0%
2
0%
1
7%
Written Reviews
There are no written reviews yet.