Virtusa Consulting Services
10+ Interview Questions and Answers
Q1. What init used in python Sudo program on ascending order of list items as given
The init used in Python is __init__ which is a constructor method for initializing objects.
The __init__ method is called automatically when an object is created.
It takes self as the first parameter and can take additional parameters for initialization.
Example: class Car: def __init__(self, make, model): self.make = make self.model = model
In the above example, the __init__ method initializes the make and model attributes of the Car object.
Q2. what are oops concept what is encapsulation what is dbms
OOPs concepts are principles in object-oriented programming, encapsulation is the bundling of data and methods within a class, and DBMS stands for Database Management System.
OOPs concepts include inheritance, polymorphism, encapsulation, and abstraction
Encapsulation is the concept of bundling data and methods that operate on the data within a single unit, such as a class
DBMS is a software system that manages databases, allowing users to interact with the data stored in them
Ex...read more
Q3. Different between if loop and while loop Types of pointers
If loop is used for conditional execution while while loop is used for repetitive execution.
If loop executes the code block only if the condition is true, while loop executes the code block repeatedly until the condition becomes false.
If loop is used when the number of iterations is known, while loop is used when the number of iterations is unknown.
Example of if loop: if(x > 0) { //code block }
Example of while loop: while(x > 0) { //code block }
Q4. How to find a prime number?
A prime number is a number greater than 1 that is divisible only by 1 and itself.
Start by checking if the number is divisible by any number less than itself.
If it is divisible by any number other than 1 and itself, it is not prime.
Use a loop to iterate through numbers from 2 to the square root of the number being checked.
If the number is divisible by any of these numbers, it is not prime.
If the number is not divisible by any of these numbers, it is prime.
Q5. Difference between interface and abstract in java
Interface in Java is a blueprint of a class that can have abstract methods and constants. Abstract class is a class that can have abstract methods and concrete methods.
Interface can only have abstract methods and constants, while abstract class can have abstract methods and concrete methods.
A class can implement multiple interfaces but can only extend one abstract class.
Interfaces are used to achieve multiple inheritance in Java.
Abstract classes can have constructors, while i...read more
Q6. what do you know about java
Java is a popular programming language known for its platform independence and object-oriented approach.
Java is an object-oriented programming language
It is known for its platform independence, meaning Java programs can run on any device that has a Java Virtual Machine (JVM)
Java is used for developing a wide range of applications, from mobile apps to enterprise systems
Java has a rich set of libraries and frameworks that make development easier and faster
Q7. Difference between for and while loop?
For loop is used when the number of iterations is known, while loop is used when the condition is true.
For loop is used when the number of iterations is known in advance.
While loop is used when the condition is true.
For loop is more suitable for iterating over arrays or collections.
While loop is more flexible as it can handle complex conditions.
Q8. How to reverse a string?
To reverse a string, iterate through the characters of the string and swap the first character with the last, the second character with the second-to-last, and so on.
Iterate through the characters of the string using a loop
Swap the characters at the corresponding positions using a temporary variable
Continue swapping until the middle of the string is reached
Q9. Explain object oriented programming?
Object-oriented programming is a programming paradigm that organizes code into objects, which are instances of classes.
Encourages modular and reusable code
Focuses on data and behavior encapsulation
Supports inheritance and polymorphism
Promotes code organization and maintainability
Examples: Java, C++, Python
Q10. what are oops concept Explain
Object-oriented programming concepts that promote code reusability and modularity.
Encapsulation: bundling of data and methods into a single unit (class)
Inheritance: ability of a class to inherit properties and methods from another class
Polymorphism: ability to use a single interface to represent different types of objects
Abstraction: hiding unnecessary details and exposing only essential features
Example: In a car manufacturing system, Car class can inherit properties and meth...read more
Q11. What is Object and class
An object is an instance of a class, which is a blueprint for creating objects with similar properties and behaviors.
A class is a template or blueprint that defines the properties and behaviors of objects.
An object is an instance of a class and represents a specific entity with its own unique set of properties and behaviors.
Classes can have attributes (variables) and methods (functions) to define the behavior of objects.
Objects can interact with each other by invoking methods...read more
Q12. explain constructor and deconstructor
Constructor is a special method used to initialize objects in a class, while destructor is a method used to clean up resources before an object is destroyed.
Constructor is called when an object is created, typically used to initialize variables and allocate memory.
Destructor is called when an object is destroyed, used to release resources like memory or close files.
In C++, constructor has the same name as the class and no return type, while destructor has the same name with a...read more
Q13. Ready to sign 2 year bond
I am open to signing a 2 year bond if the terms are reasonable and beneficial for both parties.
Consider the benefits and drawbacks of signing a bond
Review the terms and conditions of the bond carefully
Ensure that the bond aligns with your career goals and aspirations
Q14. who founded java
Java was founded by James Gosling, Mike Sheridan, and Patrick Naughton.
Java was developed by a team of engineers at Sun Microsystems, led by James Gosling.
The initial version of Java, called Oak, was created in the early 1990s.
James Gosling is often referred to as the 'Father of Java' for his significant contributions to its development.
Q15. ready to relocation
Yes, I am ready and willing to relocate for the right opportunity.
I am open to relocating for career growth and new experiences.
I have relocated in the past for job opportunities and have found it to be a positive experience.
I am willing to consider relocation options within a reasonable distance from my current location.
Q16. Explain Opps concept
Opps concept stands for Object-oriented programming principles, which are a set of guidelines to design and implement software solutions using objects and classes.
Encapsulation: Bundling data and methods that operate on the data into a single unit (object)
Inheritance: Allowing a class to inherit properties and behavior from another class
Polymorphism: Ability for objects to be treated as instances of their parent class or their own class
Abstraction: Hiding the complex implemen...read more
Q17. Pillars of oops
Pillars of OOPs include encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Inheritance: Ability of a class to inherit properties and behavior from another class.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details and showing only the necessary features.
More about working at Virtusa Consulting Services
Interview Process at null
Top Associate Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month