1. Question: Consider the following code: [/code] public class Jam { public void apple(int i, String s) { } //ABC } [/code] Choose possible valid code replacements of "//ABC" among the choices:

    A
    public void apple(String s, int i) {}

    B
    public int apple(int i, String s) {}

    C
    public void apple(int i, String mystring) {}

    D
    public void apple(int i, String mystring) {} • public void Apple(int i, String s) {}

    Note: Not available
    1. Report
  2. Question: RMI allows remote communication between:

    A
    C++ and Java

    B
    C and Java

    C
    Pascal and Java

    D
    Java and Java

    E
    Java and TCP/IP

    Note: Not available
    1. Report
  3. Question: Which of the following interfaces makes it possible for Java to save an object to a file and turn it into a data stream?

    A
    java.io.Serialization

    B
    java.net.Serializable

    C
    java.net.Serialization

    D
    java.io.Serializable

    E
    ava.net.io.Serializable

    Note: Not available
    1. Report
  4. Question: As part of the type erasure process, when compiling a class or interface that extends a parameterized class or implements a parameterized interface, the compiler may need to create a synthetic method, called a _________.

    A
    bridge method

    B
    helper method

    C
    stub method

    D
    raw method

    Note: Not available
    1. Report
  5. Question: Consider the following code:
    public static void main(String bicycle[])
    {
            System.out.println(bicycle[0]);
    }
    What would be the result if "java TwoTyre one two" is entered in the command line?

    A
    one

    B
    two

    C
    TwoTyre

    D
    None

    Note: Not available
    1. Report
  6. Question: With regard to the destroy lifecycle method, identify the correct statements about its purpose or about how and when it is invoked.

    A
    It gives the servlet an opportunity to clean up resources.

    B
    Like try-catch, it is called upon an exception.

    C
    It is rarely used but can be called to remove a servlet from memory.

    D
    It isn't called if the server crashes.

    Note: Not available
    1. Report
  7. Question: What is the term to describe a situation where two or more threads are blocked forever, waiting for each other?

    A
    deadlock

    B
    starvation

    C
    livelock

    D
    liveness

    Note: Not available
    1. Report
  8. Question: What will be the output of the following code?
    public class MyTest {
    
        public static void main(String[] args) {
            for (int i=0; i > 10; i+=2) {
                System.out.println(i);
            }
        }
    }

    A
    Nothing will It will print the following output: 0 2 4 6 8be printed.

    B
    It will print the following output: 0 2 4 6 8

    C
    Compile time error

    D
    It will print the following output: 0 1 2 3 4 5 6 7 8 9

    Note: Not available
    1. Report
  9. Question: Which of the following cannot apply to constructors?

    A
    Name same as class name

    B
    Void return type

    C
    Can have parameters

    D
    Overloading

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