Java Bootcamp – Workbooks and Challenges
)}

Workbook 2.5

From the Java-Bootcamp-Resources, open the Workbook 2.5 folder.

Screen Shot 2022-10-11 at 1.53.18 AM.png

JavaGram

In this workbook, you will create a sign-up page for JavaGram!

Screen Shot 2022-10-11 at 2.03.09 AM.png

Careful from the Incoming Trap!

You will encounter the nextLine() trap when picking up the username.

nextLine() Trap
PitfallnextLine() gets skipped when placed after nextInt() , nextDouble(), or nextLong().
SolutionAdd an extra nextLine() before the "real" nextLine().
ExplanationThe upcoming lesson on Delimiters will explain why this happens.

Task 1

Use Scanner to pick up each response.

Screen Shot 2022-10-31 at 2.14.29 AM.png

Task 2

Print the data that you picked up.

Screen Shot 2022-10-31 at 2.19.53 AM.png

Notice how it prints in a nice format. \n inserts a new line.

t.png

\t inserts a tab of space. n.png

Result

Solution

The code solution is beside the starter project.

Screen Shot 2022-10-11 at 2.21.48 AM.png

The video solution is inside the appendix (last section on Udemy).

Screen Shot 2022-10-11 at 2.20.58 AM.png

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.