I need help with the following assignment in Java. Match the following terms to the definition below. Note that there are more terms than definitions.
I need help with the following assignment in Java.
Match the following terms to the definition below. Note that there are more terms than definitions.
*=
=*
**
(double)
(floating)
0
1
block
box
counter-controlled
if
ifelse
garbage
group
nested
post-fix
pre-fix
sentinel
sequence
set
strongly-typed
weakly-typed
Which term from the above word bank matches each description below?
This value can be used to terminate repetition when the number of iterations is not known in advance
Default value for instance variables of type int, bool, double
Use this type of loop when the number of iterations is known in advance
Statement is used to execute one action when a condition is true and another when that condition is false
Can use this compound operator toshorten: a = a * 2
A language that requires all variables to have a type
x++ is ____ increment
A control statement inside another control statement
Used to make a temporary floating-point copy of its operand
A set of statements contained in a set of { }s
Answer the following questions:
Write 4 different ways to add 1 to the integer variable num
How many times does the following loop execute?
int i = 0;
while (i <= 2)
{
System.out.println("in the loop");
i++;
}
What does the following code output?
int i = 3;
if (i == 2);
System.out.println("in if");
System.out.println("after the if");
How many times does the following loop execute?
int x = 0;
int total = 0;
while (x < 5)
total += x;
x++;
Looking at the following code, what word do you think you should replace xxx with? yyy with?
if (num % 2 == 0)
System.out.prinln("num is xxx");
else
System.out.prinln("num is yyy");
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started