3i Infotech Placement: Sample Questions 545 - 546 of 1245

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 545

Edit

Describe in Detail

Essay▾

What will be the output of the following query?

SELECT REPLACE (TRANSLATE (LTRIM (RTRIM ( ‘ATHEN!’ ‘’ ) , ‘’ ) , ‘AN’ ‘⚹⚹’ ) , ‘⚹’ ‘TROUBLE’ ) FROM DUAL.

Explanation

  • 1st step: rtrim ( ‘! ! athen! !’ , ‘!’ )
    • Output becomes “! ! athen”
  • 2nd step: ltrim ( ″ athen ′ , ′ an ′ , ′ ⚹⚹ ′ )
    • Output becomes ″ ⚹ the ⚹ ″
  • 3rd step: trancelate ( ‘athen’ , ‘an’ , ‘⚹⚹’ )
    • Output becomes “⚹ the ⚹”
  • 4th step: replace ( ‘⚹ the ⚹’ , ‘⚹’ , ‘trouble’ )
  • Finally the output is “TROUBLETHETROUBLE” .

Question 546

Appeared in Year: 2004

Question

MCQ▾

Ejb Create () method of CMP bean returns

Choices

Choice (4)

a.

Primary Key class

b.

Null

c.

Home Object

d.

Remote Object

Answer

b.

Explanation

  • Return method for ejb Create () CMP bean is null. CMP stands for Container-managed persistence.
  • EJB container manages data by saving it to a designated resource- normally a database.
  • Data is defined in the container for it to be managed within the deployment descriptors.
  • Container manages the data by saving it to the database.
  • CMP fields are usually mapped in the orion-ejb-jar. xml similar to “Primary Key” - with complex primary key containing more than a single field.

Developed by: