Practicing and exploring
Test your knowledge and understanding by answering some questions, getting some hands-on practice, and exploring this chapter's topics with deeper research.
Exercise 3.1 – Test your knowledge
Answer the following questions:
- What happens when you divide anÂ
int
 variable byÂ0
? - What happens when you divide aÂ
double
 variable byÂ0
? - What happens when you overflow anÂ
int
 variable, that is, set it to a value beyond its range? - What is the difference betweenÂ
x = y++;
 andÂx = ++y;
? - What is the difference betweenÂ
break
,Âcontinue
, andÂreturn
 when used inside a loop statement? - What are the three parts of aÂ
for
 statement and which of them are required? - What is the difference between theÂ
=
 andÂ==
 operators? - Does the following statement compile?
for ( ; ; ) ;
- What does the underscoreÂ
_
 represent in aÂswitch
 expression? - What interface must...