1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aleksley [76]
3 years ago
6

The following code is intended to test whether the int variable num is less than 10, and if so print a warning and set it to 10.

The code then prints the value of num.
if (num < 10)
System.out.println( "This is smaller than 10" );
num = 10;
System.out.println("Value of num is " + num);
What correction should be made so the code functions as intended?

An else statement should be added between the 3rd and 4th lines
The final line should be printed every time, not just when num hasn’t been changed.
A semicolon should be added at the end of the first line
The operator ‘<’ should be changed to ‘<=’ in the if statement
No correction should be made
Curly braces ‘{ }‘ should be added to enclose the second and third lines

Computers and Technology
1 answer:
hoa [83]3 years ago
6 0

The only correction I see is you need to add curly braces to enclose the second and third lines.

You might be interested in
What does Pentium means?:/
netineya [11]
Pentium is just a brand of a CPU chips from Intel that is usually in your laptops or chromebooks. It's used for general purpose computing. Produced by Intel since 1993. 
4 0
3 years ago
Read 2 more answers
The text between and defines the _____.
Genrish500 [490]
Active text on a page
5 0
2 years ago
A video consists of a sequence of:
PolarNik [594]
A) Frames. Is the anwser!!
4 0
2 years ago
A good first step to understanding any kind of text is to :
Vitek1552 [10]

Answer:

find the main idea

Explanation:

6 0
3 years ago
Does any body like animal jam
cricket20 [7]

Answer:

Never used it so I do not know.

Explanation:

To be honest i thought you meant like animal jelly at first

7 0
3 years ago
Read 2 more answers
Other questions:
  • When using presentation aids A. make the aid available for the audience to look at throughout the speech. B. prepare to give you
    6·1 answer
  • Semiconductor memory is used mainly for primary storage even with its high cost. In another hand, the magnetic tape is the cheap
    9·2 answers
  • The picture that graphically represents the items you use in Windows is called a/an
    12·2 answers
  • Using symbols (%, $, #, etc.) can make it easier to take notes.
    8·2 answers
  • a) Before writing any code, you should go through a design process. Try to do so carefully – either follow a top-down approach,
    15·1 answer
  • Clearing the computer's cache helps store recently-used information.
    8·1 answer
  • Need help please asap
    9·1 answer
  • A blogger writes that the new "U-Phone" is superior to any other on the market. Before buying the U-Phone based on this review,
    7·2 answers
  • Case Study/Scenario: First, Julio clicks Tools from the Chrome menu on the toolbar. Next, he looks for Manage Add-Ons but can no
    9·1 answer
  • WAP to find area of circle​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!