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
vova2212 [387]
3 years ago
10

What are the arguments both for and against the exclusive use of boolean expressions in the control statements in java (as oppos

ed to also allowing arithmetic expressions, as in c++)?
Computers and Technology
1 answer:
sineoko [7]3 years ago
7 0

Reliability is the major argument for the exclusive use of Boolean expressions (expressions that result to either true or false) inside control statements (i.e. if…else, for loop). Results from control statements become reliable because Java has disallowed other types to be used. Other types, like arithmetic expressions in C++ oftentimes include typing errors that are not detected by the compiler as errors, therefore causing confusion.

You might be interested in
What are some preferences you can set in photoshop?
pishuonlain [190]

Answer: face brightness

Explanation:

hope this is the right answer :)

5 0
2 years ago
How is the execution speed of machine language compared to that of high-level languages? The execution speed of machine language
Alik [6]

The execution speed of machine language is faster than the execution speed of other languages. Machine or assembly language will execute the fastest as compared to high-level languages. No other language can execute faster than Machine language since instructions are directed straight to the CPU. Other high-level languages often add some non-zero amount of overhead to the execution time, thus, causing some delay.

7 0
3 years ago
Read 2 more answers
Convert infix to postfix
kvv77 [185]

Answer:

static int checkSymbol(char ch)

{

switch (ch)

{

case '+':

case '-':

return 1;

case '*':

case '/':

return 2;

case '^':

return 3;

}

return -1;

}

static String convertInfixToPostfix(String expression)

{

String calculation = new String("");

Stack<Character> operands = new Stack<>();

Stack<Character> operators = new Stack<>();

 

for (int i = 0; i<expression.length(); ++i)

{

char c = expression.charAt(i);

if (Character.isLetterOrDigit(c))

operands.push(c);

else if (c == '(')

operators.push(c);

 

else if (c == ')')

{

while (!operators.isEmpty() && operators.peek() != '(')

operands.push(operators.pop());

 

if (!operators.isEmpty() && operators.peek() != '(')

return NULL;    

else

operators.pop();

}

else

{

while (!operators.isEmpty() && checkSymbol(c) <= checkSymbol(operators.peek()))

operands.push(operators.pop());

operators.push(c);

}

}

while (!operators.isEmpty())

operands.push(operators.pop());

while (!operands.isEmpty())

calculation+=operands.pop();

calculation=calculation.reverse();

return calculation;

}

Explanation:

  • Create the checkSymbol function to see what symbol is being passed to the stack.
  • Create the convertInfixToPostfix function that keeps track of the operands and the operators stack.
  • Use conditional statements to check whether the character being passed is a letter, digit, symbol or a bracket.
  • While the operators is  not empty, keep pushing the character to the operators stack.
  • At last reverse and return the calculation which has all the results.
4 0
2 years ago
_____ is an example of a professional networking site where you keep in touch with business contacts.
WINSTONCH [101]

Answer:

"LinkedIn" is the correct answer for the above question.

Explanation:

  • LinkedIn is used to build a connection between people and communicate. But it is used to connect only business type contacts.
  • So, when any user wants to make any business type of contacts, then he can do this with the help of making an account on LinkedIn and then add the business people on it.
  • The above question asked about the networking site which is used to connect the business contacts. This site is known as LinkedIn.
8 0
2 years ago
NEED HELP 100 POINTS FOR ANSWER AND BRAINIEST!!! Which comparison operator is used to signify that a value is not equal to anoth
katrin2010 [14]

Answer:

We use SQL Not Equal comparison operator (<>) to compare two expressions. For example, 10<>11 comparison operation uses SQL Not Equal operator (<>) between two expressions 10 and 11

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • A Color class has a method getColorName that returns a string corresponding to the common name for the color, e.g., yellow, blue
    11·1 answer
  • The class Date has a single constructor that accepts the integer value: a month- (1 for January through 12 for December), a day
    13·1 answer
  • What will be the value of i after the C statements at the right have been executed
    6·1 answer
  • From the standpoint of the governing bodies of .com, why is it important that owners of individual domains maintain authoritativ
    5·1 answer
  • What is the voltage drop across R4 in the diagram shown above?
    13·1 answer
  • What is the subnet mask ?
    9·2 answers
  • Information flows:
    11·1 answer
  • What is a multipurpose network device?
    10·1 answer
  • Apart from the OOPs concepts learned in this lesson, identify additional concepts and write an essay on their functions. Explain
    9·1 answer
  • Please help! I tried this by myself. But I am not sure if this is right.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!