8.1 - Introduction to Statements
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
What is a statement in Java?
💡 Hint: Think about what an instruction in your code does.
Give an example of a declaration statement.
💡 Hint: What statement do you use to declare a variable?
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is the purpose of a declaration statement?
💡 Hint: What keyword do you use to define a variable?
True or False: Expression statements can only initiate variables.
💡 Hint: Think about what else expressions can do.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Write a method that initializes variables using declaration statements and then checks if a user can vote. Use control flow and return statements.
💡 Hint: Think about how to declare age and compare it to the minimum voting age.
Create a set of statements that continually increment a variable until it reaches a certain value and use a control flow statement to exit the loop.
💡 Hint: Use a loop statement to repeat until a condition is met.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.