Where is an array stored into the memory?
Anonymous Quiz
49%
Heap Space
23%
Stack Space
16%
Heap Space & Stack Space
12%
First generation memory
Which of the following are TCL commands?
Anonymous Quiz
17%
UPDATE & TRUNCATE
30%
SELECT & INSERT
22%
GRANT & REVOKE
31%
ROLLBACK & SAVEPOINT
What does SAM stands for in the context of Functional Interface?
Anonymous Quiz
9%
Single Ambivalue method
77%
Single Abstract Method
0%
Simple active markup
15%
Simple abstract markup
Which component is used to compile, debug and execute a program?
Anonymous Quiz
50%
JVM
31%
JDK
8%
JIT
12%
JRE
How to remove duplicates from List?
Anonymous Quiz
37%
HashSet<String> listToSet = new HashSet<String>(duplicateList);
24%
HashSet<String> listToSet = duplicateList.toSet();
27%
HashSet<String> listToSet = Collections.convertToSet(duplicateList);
12%
HashSet<String> listToSet = duplicateList.getSet();
Which of the following is a correct way of inheriting class A by class B?
Anonymous Quiz
6%
class B + class A{ }
21%
class B inherits class A{ }
49%
class B extends A{ }
25%
class B extends class A{ }
Which of these is super Class of wrappers Double & Integer?
Anonymous Quiz
26%
Long
13%
Digits
26%
Float
36%
Number
which concept of java is a way of converting real world objects in terms of class?
Anonymous Quiz
38%
Polymorphism
16%
Inheritance
22%
Abstraction
25%
Encapsulation
What will be the output of the following code snippet?
class A{ } enum Enums extends A{ ABC,BCD,CDE,DEF; }
class A{ } enum Enums extends A{ ABC,BCD,CDE,DEF; }
Anonymous Quiz
15%
Runtime Error
21%
Compile time Error
34%
It runs successfully
30%
EnumNotDefinedException
What will be the output of the following Java code?
enum Season
{ WINTER, SPRING, SUMMER, FALL }; System.out.println(Season.WINTER.ordinal());
enum Season
{ WINTER, SPRING, SUMMER, FALL }; System.out.println(Season.WINTER.ordinal());
Anonymous Quiz
42%
0
40%
1
17%
2
0%
3
What is the difference between length() and size() of ArrayList?
Anonymous Quiz
19%
length() and size() return the same value
24%
length() is not defined in ArrayList
10%
size() is not defined in ArrayList
47%
length() returns capacity of ArrayList and size() returns actual number of elements stored in list
public class Program
{
public static void main(String[] args) { String s="I LIKE JAVA"; System.out.println(s.charAt(3)); } }
{
public static void main(String[] args) { String s="I LIKE JAVA"; System.out.println(s.charAt(3)); } }
Anonymous Quiz
42%
I
34%
L
22%
K
3%
E
The "all-or-none" property commonly known as
Anonymous Quiz
22%
Isolation
11%
Durability
30%
Atomicity
37%
All the above
When an array is passed to a method, will the content of the array undergo changes with the actions carried within the function?
Anonymous Quiz
70%
True
30%
False
public class VarArgs
{
public static void print(Object... obj){
System.out.println("Object...:"+obj[0]);
}
public static void main(String[] args) {
//(1) Method call here)
}
}
Which Method call, when inserted at (1), will not result in the following output from the program:
Object...: 9
{
public static void print(Object... obj){
System.out.println("Object...:"+obj[0]);
}
public static void main(String[] args) {
//(1) Method call here)
}
}
Which Method call, when inserted at (1), will not result in the following output from the program:
Object...: 9
Given the following declaration, which expression return the size of the array, assuming the array has been initialized? Select the one correct answer.
int[] array;
int[] array;
Anonymous Quiz
24%
array[].length()
14%
array.length()
17%
array[].length
26%
array.length
5%
array[].size()
14%
array.size()
Given the following code which statement is true?
public class Program
{
public static void main(String[] args) {
int k=0;
int l=0;
for(int i=0;i<=3;i++){
k++;
if(i==2){
break;
}
l++;
}
System.out.println(k+" "+l);
}
}
public class Program
{
public static void main(String[] args) {
int k=0;
int l=0;
for(int i=0;i<=3;i++){
k++;
if(i==2){
break;
}
l++;
}
System.out.println(k+" "+l);
}
}
Options for above question
Anonymous Quiz
10%
The Program will fail to compile
22%
The Program will print 3 3 , when run
42%
The Program will print 4 3 ,when run, if break is replaced by continue
18%
The Program will fail to compile of break is replaced by return
8%
The Program will fail to compile of break is replaced by empty statement