ExamVeda
Login
Home
81
What should the return type of method where there is no return value?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
82
What data structure should be used when number of elements is fixed?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
83
What causes the program to exit abruptly and hence its usage should be minimalistic?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
84
Which of the following is good coding practice to determine oddity?
i)
public boolen abc(int num)
{
	return num % 2 == 1;
}

ii)
public boolean xyz(int num)
{
	return (num & 1)!= 0;
 }
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
85
Which one of the following causes memory leak?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
86
Which of the following is a best practice to measure time taken by a process for execution?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
87
What one of the following is best practice to handle Null Pointer exception?
i) int noOfStudents = line.listStudents().count;
ii) int noOfStudents = getCountOfStudents(line);
public int getCountOfStudents(List line)
{
if(line != null)
    {
if(line.listOfStudents() != null)
            {
  return line.listOfStudents().size();
}
}
throw new NullPointerException("List is empty");
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
88
Which of the below is true about java class structure?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
89
Which of the below is false about java coding?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
90
Which is better in terms of performance for iterating an array?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board