Virtusa aptitude questions for freshers
101 / 120
A programmer is designing a class to encapsulate the information about an inventory item.
A JavaBeans component is needed to do this.
The InventoryItem class has private instance variables to store the item information :
private int itemId;
Which method signature follows the JavaBeans naming standards for modifying the itemId instance variable ?
AitemId(int itemId)
Bupdate(int itemId)
CsetItemId(int itemId)
DmutateItemId(int itemI
EupdateItemId(int itemId)
Answer: Option C
Explanation:setItemId(int itemId)
Submit Your Solution
102 / 120
In which case would you use a FULL OUTER JOIN?
ABoth tables have NULL values.
BYou want all unmatched data from one table.
CYou want all matched data from both tables.
DYou want all unmatched data from both tables.
EOne of the tables has more data than the other.
Answer: Option D
Explanation:Here is no explanation for this answer
Submit Your Solution
103 / 120
Which two statements are true about sequences created in a single instance database? (Choose two.)
AThe numbers generated by a sequence can be used only for one table
BCURRVAL is used to refer to the last sequence number that has been generated
CWhen the MAXVALUE limit for a sequence for reached, you can increase the MAXVALUE limit by using the ALTER SEQUENCE statement
DWhen a database instance shuts down abnormally, the sequence numbers that have been cached but not used would be available once again when the database instance is restarted
EBoth B & C
Answer: Option E
Explanation:I)CURRVAL is used to refer to the last sequence number that has been generated II)When the MAXVALUE limit for a sequence for reached, you can increase the MAXVALUE limit by using the ALTER SEQUENCE statement
Submit Your Solution
104 / 120
Which three statements/commands would cause a transaction to end?
ACOMMIT,CREATE , ROLLBACK
BSELECT
CCREATE Only
DROLLBACK only
ESAVEPOINT
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
105 / 120
Evaluate the following SQL statements: DELETE FROM sales;
There are no other uncommitted transactions on the SALES tabl Which statement is true about the DELETE statement?
AIt would not remove the rows if the table has a primary key
BIt removes all the rows as well as the structure of the table
CIt removes all the rows in the table and deleted rows can be rolled back
DIt removes all the rows in the table and deleted rows cannot be rolled back
Answer: Option C
Explanation:Here is no explanation for this answer
Submit Your Solution
106 / 120
Which statement is true regarding the COALESCE function?
AIt can have a maximum of five expressions in a list
BIt returns the highest NOT NULL value in the list for all rows
CIt requires that all expressions in the list must be of the same data type
DIt requires that at least one of the expressions in the list must have a NOT NULL value
Answer: Option C
Explanation:Here is no explanation for this answer
Submit Your Solution
107 / 120
Which statement is true regarding the default behavior of the ORDER BY clause?
AIn a character sort, the values are case-sensitive
BNULL values are not considered at all by the sort operation
COnly those columns that are specified in the SELECT list can be used in the ORDER BY clause
DNumeric values are displayed from the maximum to the minimum value if they have decimal positions
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
108 / 120
Which CREATE TABLE statement is valid?
ACREATE TABLE ord_details(ord_no NUMBER(2) PRIMARY KEY, item_no NUMBER(3) PRIMARY KEY, ord_date DATE NOT NULL);
BCREATE TABLE ord_details (ord_no NUMBER(2) UNIQUE, NOT NULL, item_no NUMBER(3), ord_date DATE DEFAULT SYSDATE NOT NULL);
CCREATE TABLE ord_details (ord_no NUMBER(2), item_no NUMBER(3), ord_date DATE DEFAULT NOT NULL), CONSTRAINT ord_uq UNIQUE (ord_no), CONSTRAINT ord_pk PRIMARY KEY (ord_no));
DCREATE TABLE ord_details (ord_no NUMBER(2), item_no NUMBER(3), ord_date DATE DEFAULT SYSDATE NOT NULL), CONSTRAINT ord_pk PRIMARY KEY (ord_no,item_no));
Answer: Option D
Explanation:Here is no explanation for this answer
Submit Your Solution
109 / 120
Which statement is true regarding the default behavior of the ORDER BY clause?
AIn a character sort, the values are case-sensitive
B NULL values are not considered at all by the sort operation
C Only those columns that are specified in the SELECT list can be used in the ORDER BY clause
D Numeric values are displayed from the maximum to the minimum value if they have decimal positions
Answer: Option A
Explanation:Here is no explanation for this answer
Submit Your Solution
110 / 120
Which statement is true regarding the UNION operator?
ABy default, the output is not sorted
BNULL values are not ignored during duplicate checking
CNames of all columns must be identical across all SELECT statements
DThe number of columns selected in all SELECT statements need to be the same
Answer: Option B
Explanation:Here is no explanation for this answer
Submit Your Solution
Here is the list of questions asked in Virtusa aptitude questions for freshers. 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