1. Question: Which of the following transaction modes are supported by Enterprise Java Beans?

    A
    TX_NOT_SUPPORTED

    B
    TX_BEAN_MANAGED

    C
    TX_REQUIRED

    D
    X_MANDATORY

    E
    All

    Note: Not available
    1. Report
  2. Question: What is the output of the given program?
    public class Test120 extends _Test120 {
            {
                    System.out.print("_INIT");
            }
            static {
                    System.out.print("_STATIC");
            }
            Test120() {
                    System.out.print("_CONST");
            }
            public static void main(String[] args) {
                    System.out.print("_MAIN");
                    new Test120();
            }
    }
    class _Test120 {
            {
                    System.out.print("_BIN");
            }
            static {
                    System.out.print("_START");
            }
            _Test120() {
                    System.out.print("_BASE");
            }
    }

    A
    _START_STATIC_MAIN_BIN_BASE_INIT_CONST

    B
    _STATIC_START_MAIN_BIN_BASE_INIT_CONST

    C
    _STATIC_MAIN_START_BIN_BASE_INIT_CONST

    D
    _START_MAIN_STATIC_BIN_BASE_INIT_CONST

    Note: Not available
    1. Report
  3. Question: Which distributed object technology is most appropriate for systems that consist entirely of Java objects?

    A
    RMI

    B
    CORBA

    C
    DCOM

    D
    COM

    E
    JDBC

    Note: Not available
    1. Report
  4. Question: The following code was written to save a handle to an EJBObject named 'bookEJBObject' for an online book shop:
    javax.ejb.Handle bookHandle = ________;
    ObjectOutputStream stream = new ObjectOutputStream(newFileOutputStream(fileName));
    stream.writeObject(bookHandle);
    stream.close();
    Which of the following methods should be filled in the blank?

    A
    (Handle) bookEJBObject()

    B
    bookEJBObject.getHandle()

    C
    bookEJBObject.getEJBHandle()

    D
    newHandleInstance()

    Note: Not available
    1. Report
  5. Question: Which sequence will be printed when the following program is run?
    import java.util.*;
    
    public class Test {
    
     public static void main(String str[]) {
    
      List l = new ArrayList();
      l.add(''1'');
      l.add(''2'');
      l.add(1,''3'');
      System.out.println(l);
     }
    }

    A
    [1, 3, 2]

    B
    [1, 3, 1]

    C
    [1, 1, 3]

    D
    [1, 1, 2]

    E
    This code will generate an error.

    Note: Not available
    1. Report
  6. Question: Conventionally, which directory do servlet class files get placed on?

    A
    WEB-INFservlets

    B
    webappservlets

    C
    WEB-INFclasses

    D
    WEB-INF

    Note: Not available
    1. Report
  7. Question: Which is a proper way to declare and throw exception of class XYException?

    A
    class XYException extends Exception {} ... throw new XYException();

    B
    class XYException implements Exception {} ... throw new XYException();

    C
    class XYException extends Exception {} ... throw new Exception(""XYException"");

    D
    class XYException implements Exception {} ... throw new Exception(""XYException){};

    Note: Not available
    1. Report
  8. Question: Which of the following JDBC methods is used to retrieve large binary objects?

    A
    getBinaryStream()

    B
    getText()

    C
    getAsciiStream

    D
    getString()

    E
    getUniStream()

    Note: Not available
    1. Report
  9. Question: What is the output of the given program?
    public class Test129 {
            public static void main(String[] args) {
                    A a = new A2();
                    B b = new B2();
                    System.out.println(a.a + "" + b.b);
            }
    }
    class A { int a = 1; }
    class A2 extends A { int a = 2; }
    class B { public int b = 1; }
    class B2 extends B { public int b = 2; }

    A
    1

    B
    2

    C
    11

    D
    22

    Note: Not available
    1. Report
  10. Question: What exception is thrown by this code, if arr[j]>arr[j+1]:
    public static  void main(String[] args) {
        int []arr={12,23,43,34,3,6,7,1,9,6};
            {  
                  int temp;
                  for (int i=0;i<arr.length;i++)
                  {  
                    for (int j=0;j<arr.length-i;j++ )
                    {
                      if (arr[j]>arr[j+1])
                     {  
                         temp=arr[j];
                         arr[j+1]=arr[j];
                         arr[j+1]=temp;
                      }
                    }
                  } 
                }
            for(int i=0; i<arr.length; i++)
             {
                 System.out.print(arr[i] + " ");
             }
        }

    A
    NumberFormatException

    B
    ArrayIndexOutOfBoundException

    C
    IOException

    D
    None

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd