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
kumpel [21]
3 years ago
8

Given the following while() loop, which statement is true assuming A,B,C,D are int variables and A > B? while ( ( A >= B)

|| ( (C - D) > 10)) { System.out.println(A + B + C + D); } Select one:
a. The logical expression is not valid
b. The System.out.println() statement cannot convert the integers to strings
c. The program will never enter the loop body
d. The program will never leave the loop body
Computers and Technology
1 answer:
maks197457 [2]3 years ago
4 0

Answer:

The answer is letter D.

Explanation:

The progam will never leave the loop body.  Because a loop consists of two parts, a body of a loop and a control statement. The control statement is a combination of some conditions that direct the body of the loop to execute until the specified condition becomes false.

The loop that does not stop executing and processes that statements number of times is called an infinite loop or endless loop.

You might be interested in
If she presses the left arrow , what will happened
Harman [31]
The keyboard will move
4 0
3 years ago
To change the backround color of a page, which tab would you use?
ivann1987 [24]
I have concluded the answer is a
4 0
3 years ago
Read 2 more answers
An isotope of an element has:
goldenfox [79]
C: a different atomic mass
3 0
4 years ago
Read 2 more answers
A person who breaks into a computer, network, or online site is called
dybincka [34]

Answer:

B: Hacker

Explanation:

literally anything else aren't even real things besides hacker.

5 0
3 years ago
Read 2 more answers
A perfect binary tree is a complete binary tree with all levels fully filled. Add a method in the BST class to return true if th
algol [13]

Answer:

class BST {

static class Node

{

int val;

Node left, right;

}

static boolean checkPerfectBT(Node node, int h, int d)

{

if (node == null)

return true;

 

if (node.left == null && node.right == null)

{

if(h==d+1)

return true;

else

return false;

}

 

if (node.left == null || node.right== null)

return false;

 

return checkPerfectBT(node.left, h, d+1) && checkPerfectBT(node.right, h, d+1);

}

static int height(Node node)

{

int dep = 0;

while (node != null)

{

node = node.right;

dep=dep+1;

}

return dep;

}

static boolean isPerfectBT(Node node)

{

int h = height(node);

return checkPerfectBT(node, h, 0);

}

 

static Node addNode(int x)

{

Node node = new Node();

node.val= x;

node.right = null;

node.left = null;

return node;

}

public static void main(String args[])

{

int i,j,k;

Node node= null;

node = addNode(34);

node.left = addNode(2);

node.right = addNode(322);

 

node.left.left = addNode(21);

node.left.right = addNode(23);

node.right.left = addNode(37);

node.right.right = addNode(54);

 

if (isPerfectBT(node) == true)

System.out.println("This is a Perfect Binary tree");

else

System.out.println("This is Not a perfect Binary Tree");

}

}

Explanation:

  • Calculate the depth of BST by using a while loop until it reaches a null value.
  • In the addNode method, make an object of Node class.
  • In the main method, pass the values to addNode method.
  • Finally display the relevant message to show if it's Perfect or not.
6 0
3 years ago
Other questions:
  • Which of the following is a narrative essay most like
    8·2 answers
  • Write a function named shareALetter that takes one parameter, wordList – a list of words. Create and return a dictionary in whic
    13·1 answer
  • Consider a computer that has a number of registers such that the three registers R0 = 1500, R1 =4500, and R2 = 1000.
    14·1 answer
  • Which type of memory helps in reading as well as writing data?
    13·1 answer
  • Technician A says that S-cams can be left or right handed. Technician B says that S-cam foundation brakes can have one or two an
    15·1 answer
  • What will be the output of the following code? <?php $foo = 'Bob'; $bar = $foo; $bar = "My name is $bar"; print $bar; print $
    8·2 answers
  • Setting the isShowing property to false of the opacity property to o will delete an object from an Alice world.
    15·2 answers
  • Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. End with a n
    7·2 answers
  • Fill in the table below of the Interactive Word Wall. You are provided with the
    13·1 answer
  • ( BRAINLIEST) <br> Name 2 input devices and 2 output devices on a smart phone.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!