JAVA TEST

Progress

1.

Where an object of a class get stored?

2.

HTML uses

3.

Which of this access specifies can be used for a class so that its members can be accessed by a different class in the same package?

4.

When you wish to read a collection of “Foo” via a RESTful API, which is most appropriate?

5.

A package is a collection of

6.

REST is an acronym for representational state transfer

7.

Which of the following HTTP Status code means OK, shows success?

8.

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

9.

Which HTTP method should be used to update a resource in a RESTful Web Service?

10.

Which of the following is a type of polymorphism in Java Programming?

11.

Garbage collection in Java is

12.

 Abbreviate the term DOM?

13.

When you wish to delete an existing “Foo” via a RESTful API, which is most appropriate

14.

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

15.

False statement about final method in java

16.

Which of these method of class StringBuffer is used to reverse sequence of characters?

17.

What happens if Restful resources are accessed by multiple clients?

18.

What is garbage collection in the context of Java?

19.

Runtime polymorphism feature in java is

20.

Which of the following is correct about web services?

21.

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);        
        }
    }

22.

What is garbage collection in the context of Java?

23.

Which statement is true?

24.

Which of the following is an iteration statement?

25.

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());
}

26.

Which of the following variable declaration would NOT compile in a java program?

27.

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

28.

Which header should be configured to tell the server XML is preferred over JSON?

29.

Which statement is not true in java language?

30.

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

31.

Which option is not a RESTful API constraint?

32.

What is the output of this program?

class Main

{

        public static void main(String args[])

{

try

{

System.out.print("Hello" + " " + 1 / 0);

}

catch(ArithmeticException e)

{

System.out.print("World");

}

}

}

33.

A HashMap permits the existence of:

34.

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);

35.

What is the output of the following program:
public class testmeth
{
static int i = 1;
public static void main(String args[])
{
System.out.println(i+” , “);
m(i);
System.out.println(i);
}
public void m(int i)
{
i += 2;
}
}

36.

What will be the output of the following code –
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentSkipListMap;

public class ConcurrentSkipMapTest {

public static void main (String args[])
{
Map<Integer,String> concurrentSkipListMap= new ConcurrentSkipListMap<Integer,String>();
concurrentSkipListMap.put(11,”audi”);
concurrentSkipListMap.put(44,”null”);

Iterator<Integer> keyIterator = concurrentSkipListMap.keySet().iterator();
while (keyIterator.hasNext())
{
System.out.print(keyIterator.next());

}
}

}

37.

Can we perform file handling in Java by Java I/O API?

38.

Which of these method of Thread class is used to find out the priority given to a thread?

39.

Which of these is a super class of all errors and exceptions in the Java language?

40.

TreeSet internally uses that one to store elements?

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