1. Question: Which of the following is a well-known HTTP port?

    A
    21

    B
    25

    C
    8080

    D
    80

    E
    137

    Note: Not available
    1. Report
  2. Question: What is the output of the given console application?
    public class Test31 {
            public static void main(String[] args) {
                    test();
            }
            public static void test() {
                    try {
                            System.out.print("-try");
                            return;
                    } catch (Exception e) {
                            System.out.print("-catch");
                    } finally {
                            System.out.print("-finally");
                    }
            }
    }

    A
    -try

    B
    -try-catch

    C
    -try-finally

    D
    -try-catch-finally

    Note: Not available
    1. Report
  3. Question: Which of these interfaces are used by implementations of models for JTable?

    A
    TableModel

    B
    TableColumnModel

    C
    TableSelectionModel

    D
    ListModel

    Note: Not available
    1. Report
  4. Question: Which of the following require explicit try/catch exception handling by the programmer?

    A
    Accessing a method in another class

    B
    Attempting to open a network socket

    C
    Attempting to open a file

    D
    Traversing each member of an array

    Note: Not available
    1. Report
  5. Question: What is the output of the given program?
    public class Test89 {
            public static void main(String[] args) {
                    T x = new T(""X"", null); x.start();
                    T y = new T(""Y"", x);    y.start();
                    T z = new T(""Z"", y);    z.start();
            }
    }
    class T extends Thread {
            private Thread predecessor;
            private String name;
            public T(String name, Thread predecessor) { 
                    this.predecessor = predecessor; 
                    this.name = name; 
            }
            public void run() {
                    try {
                            Thread.sleep((int)(Math.random()*89));
                            System.out.print(name);
                    } catch (InterruptedException ie) {
                            ie.printStackTrace();
                    }
            }
    }

    A
    Always XYZ

    B
    Always ZYX

    C
    Any of the following: XYZ, XZY, YXZ, YZX, ZXY, ZYX

    D
    Any of the following: XYZ, ZYX

    Note: Not available
    1. Report
  6. Question: Which of the following code snippets will take transform input string "2012/06/05" to output string "05 - 06 - 2012"?

    A
    String dateString = "2012/06/05"; 
    Date date = new SimpleDateFormat("yyyy/MM/dd").parse(dateString); 
    SimpleDateFormat sdf = new SimpleDateFormat("dd - MM - yyyy");
    System.out.println(sdf.format(date));

    B
    String dateString = "2012/06/05"; 
    Date date = new SimpleDateFormat("yyyy/MM/dd").format(dateString); SimpleDateFormat sdf = new SimpleDateFormat("dd - MM - yyyy"); System.out.println(sdf.parse(date));

    C
    String dateString = "2012/06/05"; 
    Date date = new SimpleDateFormat("dd - MM - yyyy").format(dateString); 
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
    System.out.println(sdf.parse(date));

    D
    String dateString = "2012/06/05"; 
    Date date = new SimpleDateFormat("dd - MM - yyyy").parse(dateString); 
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd"); 
    System.out.println(sdf.format(date));

    Note: Not available
    1. Report
  7. Question: Which statement is true regarding ServletContext Initialization Parameters in the deployment descriptor?

    A
    They are accessible by all servlets in a given web application.

    B
    They are accessible by all servlets in a given session.

    C
    They are accessible by all servlets in a given HTTP request.

    D
    hey are accessible by all servlets in a given container.

    Note: Not available
    1. Report
  8. Question: Which of the following statements is true of the HashMap class?

    A
    It stores information as key/value pairs.

    B
    Elements are returned in the order they were added.

    C
    It does not permit null keys.

    D
    It does not permit null values.

    Note: Not available
    1. Report
  9. Question: Which distributed object technology is most appropriate for systems that consist of objects written in different languages and that execute on different operating system platforms?

    A
    RMI

    B
    CORBA

    C
    COBRA

    D
    DCOM

    E
    COM

    Note: Not available
    1. Report
  10. Question: What is the output of the given code?
    public class Test15 {
            public static void main(String[] args) {
                    VO a = new VO(2);
                    VO b = new VO(3);
                    swapONE(a, b);
                    print(a, b);
                    swapTWO(a, b);
                    print(a, b);
            }
    
            private static void print(VO a, VO b) {
                    System.out.print(a.toString() + b.toString());
            }
    
            public static void swapONE(VO a, VO b) {
                    VO tmp = a;
                    a = b;
                    b = tmp;
            }
            public static void swapTWO(VO a, VO b) {
                    int tmp = a.x;
                    a.x = b.x;
                    b.x = tmp;
            }
    }
    
    class VO {
            public int x;
            public VO(int x) {
                    this.x = x;
            }
            public String toString() {
                    return String.valueOf(x);
            }        
    }

    A
    2332

    B
    3232

    C
    3223

    D
    2323

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