0% found this document useful (0 votes)
2K views7 pages

Virtusa Interview Questions

The document contains technical and non-technical questions related to Java programming, SQL, OOPs concepts, databases etc. It includes questions about Java fundamentals like data types, OOPs concepts of encapsulation, inheritance and polymorphism. It also has questions on SQL commands, keys, joins and databases. Non-technical questions include questions about family, interests, achievements during pandemic etc.

Uploaded by

Manimegalai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views7 pages

Virtusa Interview Questions

The document contains technical and non-technical questions related to Java programming, SQL, OOPs concepts, databases etc. It includes questions about Java fundamentals like data types, OOPs concepts of encapsulation, inheritance and polymorphism. It also has questions on SQL commands, keys, joins and databases. Non-technical questions include questions about family, interests, achievements during pandemic etc.

Uploaded by

Manimegalai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

S.NO TECHNICAL QUESTION S.

NO NON TECHNICAL QUESTION


1. Who discover the java? 1. Tell about your family
2. What do u know about Java 2. What are the languages do u know?
3. What are oops concepts 3. How many questions solved in online
assessment? What is that?
4. What are the data types u know 4. Do u agree with service agreement?
5. What is overloading and overridding 5. Are u interested to learn new technology?
6. What is inheritance and types in java. 6. What are the IT subjects you like?
7. What is SQL 7. Pandamic situations:what you achieve and
learn
8. What is difference between delete, 8. rate yourself in dbms
drop and truncate
9. What is primary key 9. Certification courses
10. What is foreign key 10. Do you know any web technology?
11. What do u know about joins 11. What will you do in your leisure time?
12. What is abstraction 12. what you are interested in
13. What is html and What is css? 13. What technologies do you know
14. What is union key 14. How you give your ratings about Java?
15. What is Encapsulation? 15. Explain OOP concepts with real example
16. Dml,ddl, Commands 16. Rate yourself for OOP, SQL (out of 5)
17. whether create object for abstract
class or not
18. types of polymorphism with example
19. how to overcome multiple
inheritance in java
20. Differentiate final, finally and
finalize in java
21. error and exception
22. arraylist vs linkedlist
23. program for finding duplicates in
array
24. procedure vs function
25. Differentiate throw and throws
26. Define Static class
27. What are Access specifiers
28. What is Normalization
29. Constraints
Join
Self join
30. What are pointers in java?
31. What is string,String buffer and
string builder
32. role of JVM in Java.
33. Syntax for retrieving details from a
table where employee age is greater
than 50
34. mutable and immutable
35. image src tag
36. If we want to use multiple primary
key what should be done?
37. Memory allocation in java
38. Super keyword in java
39. Why we using SQL keys?
40. What is Map
41. What is triggers
42. Get top 10 employees from database
1) James Gosling
2)
3) Object-oriented programming has four basic concepts: encapsulation, abstraction,
inheritance and polymorphism.
4) Primitive data types - includes byte , short , int , long , float , double , boolean and
char.
Non-primitive data types - such as String , Arrays and Classes (you will learn more
about these in a later chapter)
5) Overloading occurs when two or more methods in one class have the same method
name but different parameters. Overriding occurs when two methods have the same
method name and parameters.
6) Types of Inheritance in java
a. Single Inheritance
b. Multi-level Inheritance
c. Hierarchical Inheritance
d. Hybrid Inheritance
7) SQL stands for Structured Query Language
SQL lets you access and manipulate databases
SQL can execute queries against a database
SQL can retrieve data from a database
SQL can insert records in a database
SQL can update records in a database
SQL can delete records from a database
SQL can create new databases
SQL can create new tables in a database
8) DELETE :
Basically, it is a Data Manipulation Language Command (DML). It is used to delete
one or more tuples of a table. With the help of the “DELETE” command, we can
either delete all the rows in one go or can delete rows one by one.

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

Basic command present in DDL are


BASIC command present in DML are
CREATE, DROP, RENAME, ALTER
UPDATE, INSERT, MERGE etc.
etc.

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.

2) Manipulation with ArrayList is slow because Manipulation with LinkedList is faster than


it internally uses an array. If any element is ArrayList because it uses a doubly linked list, so
removed from the array, all the other elements no bit shifting is required in memory.
are shifted in memory.

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.

4) ArrayList is better for storing and LinkedList is better for manipulating data.


accessing data.

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.

public - members are accessible from outside the class


private - members cannot be accessed (or viewed) from outside the class
protected - members cannot be accessed from outside the class, however, they can be
accessed in inherited classes.

28) Normalization is the process of organizing data in a database. This includes


creating tables and establishing relationships between those tables according to rules
designed both to protect the data and to make the database more flexible by
eliminating redundancy and inconsistent dependency.
29) In DBMS, CONSTRAINTS are the set of rules that ensures that when an
authorized user modifies the database they do not disturb the data
consistency and the constraints are specified within the DDL commands like “alter”
and “create” command.
A JOIN clause is used to combine rows from two or more tables, based on a related
column between them.
A SELF JOIN is a regular join, but the table is joined with itself.

30) A POINTER IS JUST THE ADDRESS OF SOME location in memory. In Java,


pointers play an important role behind the scenes in the form of references to objects.
A Java variable of object type stores a reference to an object, which is just a pointer
giving the address of that object in memory.
31) String buffer and StringBuilder both are mutable classes which can be used to do
operation on string objects such as reverse of string, concating string and etc. We
can modify string without creating a new object of the string. A string buffer is
thread-safe whereas string builder is not thread-safe.
32) JVM is specifically responsible for converting bytecode to machine-specific
code and is necessary in both JDK and JRE. It is also platform-dependent and
performs many functions, including memory management and security.

33) Select * from employee where age>50;

34) Mutable Objects


The mutable objects are objects whose value can be changed after initialization. We
can change the object's values, such as field and states, after the object is created. For
example, Java.util.Date, StringBuilder, StringBuffer, etc.
Immutable Objects
The immutable objects are objects whose value can not be changed after initialization.
We can not change anything once the object is created. For example, primitive objects
such as int, long, float, double, all legacy classes, Wrapper class, String class, etc.
35) <img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="600">
36) When multiple fields are used as a primary key, they are called a composite key.
If a table has a primary key defined on any field(s), then you cannot have two records
having the same value of that field(s).
37) Memory allocation in java refers to the process where the computer programs and
services are allocated dedicated to virtual memory spaces. The Java Virtual
Machine divides the memory into Stack and Heap Memory.
38) The super keyword in Java is a reference variable which is used to refer immediate
parent class object.
39) An SQL key is either a single column (or attribute) or a group of columns that can
uniquely identify rows (or tuples) in a table. SQL keys ensure that there are no rows
with duplicate information. Not only that, but they also help in establishing a
relationship between multiple tables in the database.
40) A Map is an object that maps keys to values. A map cannot contain duplicate keys:
Each key can map to at most one value. It models the mathematical function
abstraction.
41) A trigger is a special type of stored procedure that automatically runs when an
event occurs in the database server. DML triggers run when a user tries to modify
data through a data manipulation language (DML) event. DML events are INSERT,
UPDATE, or DELETE statements on a table or view.
42)

You might also like