JAVA
2.7K subscribers
73 photos
111 files
76 links
Download Telegram
In operating system which of the following statement best describes the dispatch latency element that is available in time sharing systems?
Anonymous Quiz
16%
Time taken to switch from one thread to another thread
26%
Time taken to swap the process
26%
Time taken to submit and complete the process
32%
Time taken to terminate the process and initiate another process
In operating system which of the following statements about preemptive scheduling is correct
1)Resources are allocated to a process for a limited period
2)Processes cannot be interrupted until they are terminated
3)Overhead are not available in a process
4) Low Priority processes can starve
which of the following is not valid input for switch case?
Anonymous Quiz
0%
Int
47%
Long
16%
Char
38%
String
What is the superclass of all the exceptions and errors in java
Anonymous Quiz
29%
Exception
11%
RuntimeException
57%
Throwable
4%
CompileTimeException
public class Program
{
public static void main(String[] args) {int x=0,y=0; for(int j=0;j<5;j++){ if((++x>2)||(++y>2)){ System.out.println("y = "+y); x++; } } System.out.println(x+" "+y); } }
Anonymous Quiz
26%
8,2
37%
8,3
21%
5,3
16%
8,5
public class Program
{
final static short shortCount=2;
public static int count=0;
public static void main(String[] args) {
for(int counter=0;counter<3;counter++){
switch(counter){
case shortCount: System.out.print ("0");
case shortCount-1: System.out.print ("1");
case shortCount-2: System.out.print ("2");
}
}
}
}
public class Program
{
public static void main(String[] args) {
int i;
char[] a=new char[]{97,99,101,103,105};
for(i=0;i<5;i=i+2){
System.out.print (a[++i]);
}
System.out.print (i);
}
}
Which of these is not a interface in the Collections Framework?
Anonymous Quiz
3%
Collection
86%
Group
9%
Set
3%
List
Which interface restricts duplicate elements?
Anonymous Quiz
54%
Set
17%
List
3%
Map
26%
All of these
Which of these collection class has the ability to grow dynamically?
Anonymous Quiz
8%
Array
8%
Arrays
77%
ArrayList
8%
None of these
The accuracy and efficiency of a HashMap can be guaranteed with:
Anonymous Quiz
23%
override equals method
39%
override hashCode method
6%
None of these
32%
All of these
A HashMap allows the existence of:
Anonymous Quiz
19%
null values
28%
one null key
17%
None of these
36%
All of these
What implementation of Iterator can traverse a collection in both directions?
Anonymous Quiz
24%
Iterator
45%
ListIterator
14%
SetIterator
17%
MapIterator
The Comparable interface contains which called?
Anonymous Quiz
40%
toCompare
9%
compare
43%
compareTo
9%
compareWith