Virtusa Aptitude Test Question with Answers
21 / 120
You wish to store a small amount of data and make it available for rapid access. You do not have a need for the data to be sorted, uniqueness is not an issue and the data will remain fairly static Which data structure might be most suitable for this requirement?
ATreeSet
BHashMap
CLinkedList
Dan array
Answer: Option D
Explanation:Here is no explanation for this answer
Submit Your Solution
22 / 120
class Test {
public static void main(String[ ] args) {
try {
String s = "5.6";
Integer.parseInt(s); // Cause a NumberFormatException
int i = 0;
int y = 2 / i;
System.out.println("Welcome to Java");
} catch (Exception ex) {
System.out.println(ex);
}
}
}
AWelcome to Java
BNumberFormatException
CException
DNone
Answer: Option B
Explanation:Here is no explanation for this answer
Submit Your Solution
23 / 120
What will be the output of the program?
public class TestDogs
{
public static void main(String [] args)
{
Dog [][] theDogs = new Dog[3][];
System.out.println(theDogs[2][0].toString());
}
}
class Dog { }
Anull
BtheDogs
CCompilation fails
DAn exception is thrown at runtime
Answer: Option D
Explanation:Here is no explanation for this answer
Submit Your Solution
24 / 120
Which declaration of the main method below would allow a class to be started as a standalone program. Select the one correct answer.
Apublic static int main(char args[])
Bpublic static void main(String args[])
Cpublic static void MAIN(String args[])
Dpublic static void main(String args)
Epublic static void main(char args[])
Answer: Option B
Explanation:Here is no explanation for this answer
Submit Your Solution
25 / 120
If we do
ArrayList lst = new ArrayList();
What is the initial capacity of the ArrayList lst ?
A10
B8
C15
D12
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
26 / 120
"Software engineers should not use their technical skills to misuse other people's computers."Here the term misuse refers to:
AUnauthorized access to computer material
BUnauthorized modification of computer material
CDissemination of viruses or other malware
DAll of the mentioned
Answer: Option D
Explanation:Here is no explanation for this answer
Submit Your Solution
27 / 120
Explain what is meant by PRODUCT with reference to one of the eight principles as per the ACM/IEEE Code of Ethics ?
AThe product should be easy to use.
BSoftware engineers shall ensure that their products and related modifications meet the highest professional standards possible.
CSoftware engineers shall ensure that their products and related modifications satisfy the client.
DIt means that the product designed /created should be easily available.
Answer: Option B
Explanation:Here is no explanation for this answer
Submit Your Solution
28 / 120
An sequence diagram is:
AA time-line illustrating a typical sequence of calls between object function members
BA call tree illustrating all possible sequences of calls between class function members
CA time-line illustrating the changes in inheritance and instantiation relationships between classes and objects over time
DA tree illustrating inheritance and relationships between classes
EA directed acyclic graph illustrating inheritance and instantiation relationships between classes and objects
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
29 / 120
Which of these classes implement the Collection interface SortedMap. Select the one correct answers.
AHashMap
BHashtable
CTreeMap
DHashSet
ETreeSet
Answer: Option C
Explanation:Here is no explanation for this answer
Submit Your Solution
30 / 120
Which of these are core interfaces in the collection framework. Select the one correct answer.
ATree
BStack
CQueue
DMap
ELinkedList
Answer: Option D
Explanation:Here is no explanation for this answer
Submit Your Solution
Here is the list of questions asked in Virtusa Aptitude Test Question with Answers Virtusa Mock Test. Practice Virtusa Written Test Papers with Solutions and take Q4Interview Virtusa Online Test Questions to crack Virtusa written round test. Overall the level of the Virtusa Online Assessment Test is moderate. Only those candidates who clear the written exam will qualify for the next round, so practic all the questions here and take all the free tests before going for final selection process of Virtusa