Self Test With Answers



1) Which of the following would likely be the simplest in nature?

a) Visual GUI JavaBean
b) JSP Data Bean
c) JSP Session Bean
d) Enterprise JavaBean     ( b or c )


// If the session bean was a simple algorithm, for instance returning

// the time it might be simplest. The point is that both EJB and Visual
// JavaBeans are more complex expressions of the beans metaphor.


2) True or False? Simple properties that use boolean types must us the
'is' prefix in it's getter method.  True / False    ( False )

// It is just an option get and set methods can be used to return boolean.

3) Which of the following is not a property type specified by the JavaBean
    specification.

a) simple
b) indexed
c) bound
d) inhibited                                                            ( d )

4)  Which of the following useBean attributes represents a little used
      alternative way to reference a JavaBean instance into a Java page.

a) id
b) scope
c) beanName
d) type                                                                        ( c )

5) Which of the following is not a legal id identifier.
     (Note: there are more than one answer)

a ) bill
b) inner$
c) _ref
d) x2345_12D                                              ( b and c )

// Comment: id identifiers must start with a letter. Subsequent
// characters
must be letters, numbers or underscores.

6) True or False? The body of useBean tag has characteristics
     roughly analogous
to a Java class constructor.    ( True )

// Comment: True. This zone is read once and is useful for
//  initialization like a constructor