Tag: programming languages

Questions Related to programming languages

  1. 404 /error.jsp

  2. mypackage.MyException 404 /error.jsp

  3. mypackage.MyException 404

  4. mypackage.MyException /error.jsp


Correct Option: A,D
  1. 3

  2. Anywhere between 5 to 17

  3. Anywhere between 4 to 16

  4. Anywhere between 1 to 17

  5. No constraints


Correct Option: C
  1. Step will not execute

  2. Step will abend

  3. Step will execute

  4. S0C7


Correct Option: A
  1. 1

  2. 2

  3. 4

  4. 5


Correct Option: D
Explanation:

To solve this question, the user needs to understand the concept of a ternary operator and the logical comparison operator.

The expression (1==2) will evaluate to false since 1 is not equal to 2.

The ternary operator ? : has the syntax condition ? value_if_true : value_if_false.

Therefore, the expression will evaluate to 5 since false is equivalent to 0, and the value if false is 5.

So, the answer is:

The Answer is: D. 5

  1. 0

  2. 3

  3. 8

  4. 16


Correct Option: A
Explanation:

To solve this question, the user needs to know the concept of the modulus operator (%) and basic arithmetic.

Explanation:

The modulus operator (%) returns the remainder when the left operand is divided by the right operand.

When the expression ${12 % 4} is evaluated, it is equivalent to the expression 12 divided by 4, with the remainder returned as the result. Since 12 is evenly divisible by 4, the remainder is 0.

Thus, the correct answer is:

The Answer is: A) 0