GoConqr has a new look! Let us know what you think.

Quiz

java

Rodd Moran 30 questions Updated 6 Apr 2016

Take the quiz

Questions in this quiz (30)

  1. 1Which two are true? (Choose two.)
    1. AJ2EE runs on consumer and embedded devices.
    2. BJ2EE includes the MIDP API.
    3. CJ2EE includes servlet APIs and EJB APIs.
    4. DJ2EE application developers need J2SE.
    5. EJ2EE applications depend on web servers.
  2. 2Which two are associated with the web tier in a J2EE web-based application? (Choose two.)
    1. Aservlets
    2. BJAX-RPC
    3. CJMS
    4. Dentity beans
    5. EJSP
  3. 3Given:
    1.class Test{
    2.public static void main(String args[]){
    3.int num1 = 10, num2=20, result;
    4.result =calc (num1,num2);
    5.System.out.println(result);
    6.}
    7.
    8.//insert code here
    9.}
    Which, inserted at line 8, produces the output 30?
    1. Astatic int calc(int n1, int n2) { return; }
    2. Bpublic int calc(int n1, int n2) { return n1 + n2; }
    3. Cpublic int calc(int n1, int n2) { return; }
    4. Dstatic int calc(int n1, int n2) { return n1 + n2; }
    5. Estatic void calc(n1, n2) { return (n1 + n2); }
    6. Fstatic int calc(int n1, n2) { return n1, n2; };
  4. 4Given:
    1.public abstract class Wow{
    2.private int wow;
    3.public Wow( int wow ) {
    4.this.wow=wow;
    5.}
    6.public void wow(){}
    7.private void wow za () {}
    8.}
    Which is true about the class Wow?
    1. AIt does NOT compile because an abstract class must have at least one abstract method.
    2. BIt does NOT compile because an abstract class CANNOT have instance variables.
    3. CIt compiles without error.
    4. DIt does NOT compile because an abstract class CANNOT have private methods.
    5. EIt does NOT compile because an abstract class must have a constructor with no arguments
  5. 5Given:
    1.class X{
    2.private Y y;
    3.public X (Y y) {this.y = y;}
    4.}
    5.class Y{
    6.private X x;
    7.public Y () {}
    8.public Y ( X x ){this.x = x;}
    9.}
    The instance variable y is intended to represent the composition relationship “X is composed of Y.”
    Which code correctly maintains this meaning?
    1. AX x1 = new X(newY());
      X x2 = new X(new Y());
    2. BX xx =new X(null);
      Y y1= new Y(xx);
      Y y2 = new Y(xx);
    3. CY yy = new Y();
      Xx1=newX(yy);
      X x2 = new X(yy);
    4. DY y1 = new Y(newX(null));
      Y y2 = new Y(new X(null));
  6. 6You have developed a MIDlet that runs on a Java-enabled Personal Digital Assistant (PDA)
    device. Now, your employer has asked you to port the MIDlet to run on other Java platforms.
    Which is true?
    1. AThe MIDlet is 100% portable across all J2ME devices.
    2. BThe MIDlet can run within a standard web browser.
    3. CThe MIDlet is guaranteed to run correctly under J2SE.
    4. DThe MIDlet is NOT guaranteed to run on a Java technology-enabled phone.
  7. 7Which statement is true?
    1. AJMS enables an application to provide flexible, asynchronous data exchange.
    2. BJMS provides interfaces to naming and directory services.
    3. CThe JMS API is located in the java.jms package.
    4. DJMS enables an application to provide tightly coupled, distributed communication.
  8. 8Which two are true about stateless session beans? (Choose two.)
    1. AThey are used to represent data stored in an RDBMS.
    2. BThey implement the JMS API
    3. CThey are used to implement business logic
    4. DThey CANNOT hold client state
  9. 9Which two are true about javax.swing? (Choose two.)
    1. AIt includes classes for creating buttons and panels
    2. BIt is used to create MIDlets.
    3. CIt is used to create applications that have the same user interface on different platforms.
    4. DIt uses the native GUI components of each platform
  10. 10Refer to the Exhibit.

    Which relationships, referenced by the class names involved, are drawn using valid UML notation?
    Image for question 10
    1. AAB, AC, BD, and CD
    2. Bonly AC, BD, and CD
    3. Conly AB, AC, and BD
    4. Donly AB and AC
    5. Eonly BD and CD

Information

Description
Quiz on java, created by Rodd Moran on 15/03/2016.
Language
Español
Views
1
History
Created on 15 Mar 2016 · updated on 6 Apr 2016
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?