0

programming languages Online Quiz - 147

Description: programming languages Online Quiz - 147
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. A vector of arrays for a 2D geographic representation

  2. A class for containing unique array elements

  3. A class for containing unique vector elements

  4. An interface that ensures that implementing classes cannot contain duplicate keys


Correct Option: D
  1. The class can access any variable

  2. The class can only access static variables

  3. The class can only access transient variables

  4. The class can only access final variables


Correct Option: D

Which of the following is the correct syntax for suggesting that the JVM performs garbage collection

  1. System.gc();

  2. System.free();

  3. System.setGarbageCollection();

  4. System.out.gc();


Correct Option: A
  1. An exception is thrown if you attempt to add an element with a duplicate value

  2. The add method returns false if you attempt to add an element with a duplicate value

  3. A set may contain elements that return duplicate values from a call to the equals method

  4. Duplicate values will cause an error at compile time


Correct Option: B
  1. At the root of the collection hierarchy is a class called Collection

  2. The collection interface contains a method called enumerator

  3. The Set interface is designed for unique elements

  4. The interator method returns an instance of the Vector class


Correct Option: C

Which are features every EJB 2.0 container must implement or support? (Answer all that apply)

  1. A GUI bean deployment utility

  2. Transaction support for all bean types

  3. JNDI 1.2 name space

  4. Remote client views for all bean types


Correct Option: B,C

Which are the features in EJB 2.0?

  1. A Portable finder query text

  2. Container managed persistence

  3. Local interfaces for session beans

  4. XML based deployment descriptors


Correct Option: A,B,C,D

Whats true for an entity bean provider using container-manaaged persistent relationship?

  1. Relationships can be one-to-one, one-to-many or many-to-many

  2. A get method return type can use java.util.map

  3. A remote interface is required for such a bean to have bi-directional relationship with another entity bean

  4. Such a bean can have relationships with only message-driven beans


Correct Option: A
  1. javax.ejb.AccessLocalException

  2. javax.rmi.NoSuchObjectException

  3. javax.ejb.NoSuchEntityException

  4. javax.rmi.StubNotFoundException


Correct Option: B

Whats true about EJB QL queries?

  1. The SELECT clause designates query domain

  2. An EJB QL query may have parameters.

  3. The WHERE clause determines the types of objects to be selected

  4. Of the three clause types, SELECT, FROM and WHERE, only the SELECT clause is required


Correct Option: B
  1. p.discount > 10 AND p.discount < 15

  2. p.discount >= 10 AND p.discount < 15

  3. p.discount >= 10 AND p.discount <= 15

  4. p.discount > 10 AND p.discount <= 15


Correct Option: C

data student; input sno sname $ marks; datalines; 10 suganya 30 20 preethi 40 30 rathna 40 nitya 50 manasa ; run; The output dataset student contains the following records

  1. sno sname marks { 10 suganya 30} {20 preethi 40} {30 rathna 40} {. .}

  2. sno sname marks { 10 suganya 30} {20 preethi 40} {30 rathna 40}

  3. sno sname marks { 10 suganya 30} {20 preethi 40} {30 rathna } {40 nitya} {50 manasa}

  4. sno sname marks { 10 suganya 30} {20 preethi 40}


Correct Option: B

data flower; Length x $ 5 y $ 11; input x y; datalines; daisyyellow ; run; What is the value of x and y in the output dataset?

  1. NO Observations

  2. x=daisy y=missing

  3. x = daisy y=daisyyellow

  4. x = daisy y=w


Correct Option: A

data state; input name $ @; if name = 'TN' then input famous $; else input lang $; input capital $; datalines; TN food chennai AP telugu hyderabad ; run; The no of times that the input is done for each iteration

  1. 2

  2. 1

  3. 3

  4. 4


Correct Option: A

data new(Keep x y); set old; run; What is the result?

  1. The new dataset will have only variables x and y

  2. Syntax Error.The Keep statement should be (Keep = x y).

  3. The old dataset will have only variables x and y

  4. The new dataset will have all variables


Correct Option: B

proc format; value score. 1-10 = 'High' 11-20 = 'Low' ; run; What is true about this statement?

  1. Format score is created in the SAS catalog

  2. The format name should not end with .

  3. The format can be used in DATA steps

  4. The format can be used in PROC steps


Correct Option: B

data str; x='My name is myuri'; a=find(X,'MY','i',-3); run; What is the value of a?

  1. 1

  2. 12

  3. 10

  4. 2


Correct Option: A
- Hide questions