JAVA TEST

Progress

1.

Which of the following component of HTTP response contains metadata for the HTTP Response message as key-value pairs?

2.

Which of these method of class String is used to check weather a given object starts with a particular string literal?

3.

Which of these values can a boolean variable contain?

4.

Which of these are selection statements in Java?

5.

Evaluate the following Java expression, if x=3, y=5, and z=10: ++z + y - y + z + x++

6.

Which of these keywords is not a part of exception handling?

7.

Where an object of a class get stored?

8.

What is the string contained in s after following lines of code?
 StringBuffer s new StringBuffer("Hello);
 s.deleteCharAt(0);

9.

Java object oriented programming concepts is/are

10.

Which of the following component of HTTP request contains metadata for the HTTP Request message as key-value pairs?

11.

Which of these is used to read a string from the input stream?

12.

Which of the following option leads to the portability and security of Java?

13.

REST is an acronym for representational state transfer

14.

RESTful web services must be stateful

15.

Which of these keywords is used to define packages in Java?

16.

Which package includes StringTokenizer that tokenizes a string into independent words?

17.

XML stands for?

18.

HTML uses

19.

What will be the output of the following program?
public class Test { 
public static void main(String[] args) { 
    int count = 1; 
    while (count <= 15) { 
    System.out.println(count % 2 == 1 ? "***" : "+++++"); 
    ++count; 
        }      // end while 
    }       // end main  
 }  

20.

What will be the output of the following Java program?
class evaluate
    {
        public static void main(String args[])
            {
        int arr[] = new int[] {0 , 1, 2, 3, 4, 5, 6, 7, 8, 9};
        int n = 6;
                n = arr[arr[n] / 2];
        System.out.println(arr[n] / 2);
            }
    }

21.

What will be the output of the following code snippet?

int a=15;

int b=25;

if ((a < b ) || ( a = 5)>15)

system.out.println(a);

else

system.out.println(b);

22.

What will be the output of the following Java code?
class multithreaded_programing
    {
        public static void main(String args[])
        {
            Thread t = Thread.currentThread();
            t.setName("New Thread");
            System.out.println(t);        
        }
    }

23.

The default value of a static integer variable of a class in Java is,

24.

Which exception is thrown when divide by zero statement executes?

25.

object B: wait(2000); After calling this method, when will the thread A become a candidate to get another turn at the CPU?

26.

In Iterator, hasMoreElements() method of Enumeration has been changed to:

27.

A HashMap permits the existence of:

28.

____________method can be given parameters via using command line arguments.

29.

What is the valid data type for variable "a" to print "Hello World"?
switch(a)
{
   System.out.println("Hello World");
}

30.

In which of the following package Exception class exist?

31.

What will be the output of the following code –
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
public class CopyOnWriteArraySetTest
{
public static void main (String args[])
{
Set<String> copyOnWriteArraySet = new CopyOnWriteArraySet<String>();
copyOnWriteArraySet.add(” a “);
copyOnWriteArraySet.add ( ” b” );
Iterator<String> iterator = copyOnWriteArraySet.iterator();
while(iterator.hasNext())
{
copyOnWriteArraySet.add( ” c ” );
System.out.println(iterator.next());
}

32.

Which of those assortment categories has the flexibility to grow dynamically?

33.

Which of those isn’t an interface within the Collections Framework?

34.

Which of the following best describes REST?

35.

To prevent any method from overriding, we declare the method as,

36.

Multiple inheritance means,

37.

Which of these data types is used to store command line arguments?

38.

How would you configure a RESTful URL parameter that supports a search for a book based on its ID?

39.

Which of the following is not true?

40.

The efficiency and accuracy of a HashMap are often warranted with:

Assessment complete! Thank you for you time.
We are redirecting you to the result page, Please click on 'SUBMIT'