Tag: programming languages

Questions Related to programming languages

  1. Presentation Tag

  2. JSP standard Tag

  3. Custom tags

  4. All the above


Correct Option: D
  1. Integer "j" is not initialized.

  2. Nothing.

  3. You cannot declare integer i inside the for-loop declaration.

  4. The syntax of the "if" statement is incorrect.


Correct Option: B
Explanation:

To solve this question, the user should have knowledge of basic Java syntax and control flow statements.

The code is a basic for-loop that initializes an integer variable i to 0 and then increments it by 1 with each iteration until it reaches 13. Inside the loop, there is an if statement that checks if i is less than 10. If it is, it initializes an integer variable j to 2 + i. Then, it prints out the values of j and i.

Now, let's go through each option and explain why it is right or wrong:

A. Integer "j" is not initialized: This option is incorrect. The integer "j" is initialized inside the for-loop. Although it is not initialized before the loop, it is initialized before it is used.

B. Nothing: This option is incorrect. There is something wrong with the code.

C. You cannot declare integer i inside the for-loop declaration: This option is incorrect. The declaration of integer i inside the for-loop is valid Java syntax.

D. The syntax of the "if" statement is incorrect: This option is incorrect. The syntax of the if statement in the code is correct.

Therefore, the correct answer is:

The Answer is: B

  1. significant digits

  2. length

  3. exponent

  4. Both & b


Correct Option: D
  1. m1 = new TextField("sixty");

  2. 1a = 6;

  3. add(m1);

  4. m1.setText("Hello world);


Correct Option: C
  1. An entity that receives inputs and outputs

  2. A way of storing values

  3. A sequence of characters enclosed by quotes

  4. A kind of computer


Correct Option: A
  1. jspInit()

  2. jspDestroy()

  3. _jspService()

  4. Both a & b


Correct Option: D
  1. table is a variable to refers to a real number

  2. table is a variable that refers to two numbers

  3. It is not legal Java code

  4. table is a variable that refers to an array


Correct Option: D