Virtusa Interview Questions
Virtusa Interview Questions
DROP :
It is a Data Definition Language Command (DDL). It is used to drop the whole table.
With the help of the “DROP” command we can drop (delete) the whole structure in
one go
TRUNCATE :
It is also a Data Definition Language Command (DDL). It is used to delete all the
rows of a relation (table) in one go. With the help of the “TRUNCATE” command,
we can’t delete the single row as here WHERE clause is not used.
9) The PRIMARY KEY constraint uniquely identifies each record in a table. Primary
keys must contain UNIQUE values, and cannot contain NULL values. A table can
have only ONE primary key
10) A FOREIGN KEY is a field (or collection of fields) in one table, that refers to the
PRIMARY KEY in another table. The table with the foreign key is called the child
table, and the table with the primary key is called the referenced or parent table.
11) Join in DBMS is a binary operation which allows you to combine join product
and selection in one single statement. The goal of creating a join condition is that it
helps you to combine the data from two or more DBMS tables. The tables in DBMS
are associated using the primary key and foreign keys
12) Abstract Classes and Methods
Data abstraction is the process of hiding certain details and showing only essential
information to the user. Abstraction can be achieved with either abstract classes or
interfaces
13) HTML (the Hypertext Markup Language) and CSS (Cascading Style Sheets) are two
of the core technologies for building Web pages. HTML provides the structure of the
page, CSS the (visual and aural) layout, for a variety of devices. Along with graphics
and scripting, HTML and CSS are the basis of building Web pages and Web
Applications.
14) The UNION operator is used to combine the result-set of two or more SELECT
statements. Every SELECT statement within UNION must have the same number of
columns. The columns must also have similar data types. The columns in every
SELECT statement must also be in the same order.
15) Encapsulation in Java refers to integrating data (variables) and code (methods)
into a single unit. In encapsulation, a class's variables are hidden from other classes
and can only be accessed by the methods of the class in which they are found.
16)
DDL DML
17) No, we can't create an object of an abstract class. But we can create a reference
variable of an abstract class. The reference variable is used to refer to the objects of
derived classes
18) Polymorphism in Java has two types: Runtime polymorphism (dynamic binding)
and Compile time polymorphism (static binding). Method overriding is an example
of dynamic polymorphism, while method overloading is an example of static
polymorphism.
19) The solution to the problem is interfaces. The only way to implement multiple
inheritance is to implement multiple interfaces in a class. In java, one class can
implements two or more interfaces. This also does not cause any ambiguity because
all methods declared in interfaces are implemented in class.
20) Final is a keyword and is used as access modifier in Java. Finally is a block in
Java used for Exception Handling. Finalize is a method in Java used for Garbage
Collection. Application. Final in Java is used with variables, methods, and classes to
set access permissions.
21) Errors mostly occur at runtime that's they belong to an unchecked
type. Exceptions are the problems which can occur at runtime and compile time.
It mainly occurs in the code written by the developers. Exceptions are divided into
two categories such as checked exceptions and unchecked exceptions.
22)
ArrayList LinkedList
1) ArrayList internally uses a dynamic array to LinkedList internally uses a doubly linked list to
store the elements. store the elements.
3) An ArrayList class can act as a list only LinkedList class can act as a list and queue both
because it implements List only. because it implements List and Deque interfaces.
23)
24) A function would return the returning value/control to the code or calling function.
The procedures perform certain tasks in a particular order on the basis of the given
inputs. A procedure, on the other hand, would return the control, but would not
return any value to the calling function or the code.
25) The throw keyword is used inside a function. It is used when it is required to throw
an Exception logically.
The throws keyword is used in the function signature. It is used when the function
has some statements that can lead to exceptions.
26) A static class is basically the same as a non-static class, but there is one difference: a
static class cannot be instantiated. In other words, you cannot use the new operator
to create a variable of the class type.
27) Access modifiers (or access specifiers) are keywords in object-oriented languages
that set the accessibility of classes, methods, and other members. Access modifiers
are a specific part of programming language syntax used to facilitate the
encapsulation of components.