0
Alien head

programming languages Online Quiz - 187

Description: programming languages Online Quiz - 187
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

The following is NOT an example of a data type.

  1. int

  2. public

  3. button

  4. void


Correct Option: B

What does the following line of code mean? Double table[];

  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

What JSP lifecycle methods can I override?

  1. jspInit()

  2. jspDestroy()

  3. _jspService()

  4. Both a & b


Correct Option: D

Which method takes the HttpServletRequest and HttpServletResponse objects as its arguments

  1. jspInit()

  2. jspDestroy()

  3. _jspService()

  4. None of the above


Correct Option: C

What will happen if you attempt to compile and run the following code? Integer ten=new Integer(10); Long nine=new Long (9); System.out.println(ten + nine); int i=1; System.out.println(i + ten);

  1. 19 followed by 20

  2. 19 followed by 11

  3. Error: Can't convert java lang Integer

  4. 10 followed by 1


Correct Option: C

A function is:

  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

The following a legal Java statement

  1. m1 = new TextField("sixty");

  2. 1a = 6;

  3. add(m1);

  4. m1.setText("Hello world);


Correct Option: C

What are the two parts of a value of type double?

  1. significant digits

  2. length

  3. exponent

  4. Both & b


Correct Option: D

int values[] = {1,2,3,4,5,6,7,8}; for(int i=0;i< X; ++i) System.out.println(values[i]); Referring to the above, what value for X will print all members of array "values"?

  1. 1

  2. 7

  3. 8

  4. 9


Correct Option: C

int j; for(int i=0;i<14;i++) { if(i<10) { j = 2 + i; } System.out.println("j: " + j + " i: " + i); } What is WRONG with the above code?

  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

What are the different types of JSP tags?

  1. Presentation Tag

  2. JSP standard Tag

  3. Custom tags

  4. All the above


Correct Option: D

What are the JSP scripting elements?

  1. Declaration

  2. Scriplets

  3. Expressions

  4. All the above


Correct Option: D

Which one of the following is a valid declaration of an applet?

  1. Abstract class MyApplet extends java.applet.Applet {

  2. Public class MyApplet extends java.applet.Applet {

  3. Class MyApplet implements Applet {

  4. Public class MyApplet extends applet implements Runnable {


Correct Option: B

JTS stands for

  1. Java Transaction Service

  2. Java Translation Service

  3. Java Transaction Servlet

  4. Java Translation Servlet


Correct Option: A

JTA stands for

  1. Java Transaction Array

  2. Java Transaction API

  3. Java Translation Array

  4. Java Translation API


Correct Option: B

What are the call back methods in Session bean?

  1. ejbCreate()

  2. ejbPassivate(),

  3. ejbActivate()

  4. All the above


Correct Option: D

Which file contains the EJB modules of the application?

  1. .jar

  2. .war

  3. .ear

  4. .zip


Correct Option: C

Stateful session beans contain

  1. Home Interface

  2. Remote Interface

  3. Bean Class

  4. All the above


Correct Option: D

Final Inspection is done by

  1. Project leader

  2. GL

  3. Quality Reviewer

  4. Project Manager


Correct Option: C

Trying determine the shape of a cylindrical can made from 1000 cm2 of tin that has the largest possible volume is an example of:

  1. Array calculation

  2. Text manipulation

  3. Optimization problem

  4. Object oriented programming


Correct Option: C
+ View questions