vernonstancoco
vernonstancoco vernonstancoco
  • 16-09-2020
  • Computers and Technology
contestada

JAVA

What will be the result of the following two expressions
if i= 10 initially
concidering both the expressions mutually inclusive ?

a)System.out.println(++i<=0);

b)System.out.println(++i<=10);
​

Respuesta :

tonb
tonb tonb
  • 16-09-2020

Answer:

false

false

Explanation:

a) since i starts out being 10, it will never be <= 0, so that one is always false.

b) i is incremented just before it is compared to 10, so it will be 11 at the time of the comparison, which will therefore also return false.

Answer Link

Otras preguntas

A model of a building is 11 inches tall. What is the actual height of the building if the scale states that 1 inch = 1.5 feet?
should you rinse dishes before putting in dishwasher
please help Julie created a scale drawing of a decorative tile. Using a scale of 1 cm = 2 m , one side length on the drawing was 8 cm. What scale could Julie us
An eastbound train and a westbound train meet each other on parallel tracks heading in opposite directions. The eastbound train travels 12 miles per hour faster
A scuba diver is 15.5 feet below the surface of the water.if the diver continues to swim downward at a rate of 2.5 feet per second, what is her location in feet
2. Read the following passage from "Encountering the Other. The Challenge IxeT for the 21st Century." In a brief paragraph, state the central idea of this passa
the island of crete is located within what body of water
PLEASE HELP QUICKK This dues tmr pleaseeeee
You have read "Golden Glass" and "There Is a Tree That Stands," about two boys who are growing up. Using details from the passage and the poem, write an essay t
FO DERS DISC DISCOVERY SCHOOL DISCOVER​