0% found this document useful (0 votes)
85 views13 pages

Capgemini Interview

Interview
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)
85 views13 pages

Capgemini Interview

Interview
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/ 13

CAPGEMINI INTERVIEW

Tell me something about yourself?


I am Gayatri Hemant Takale. I completed my BE from SKN Sinhgad Institute of Technology
and Science Lonavala. With cgpa of 8.26. I have completed my 10 th with 90.20% from
Vainateya Vidyalaya Niphad. Then I choose IT field for my 11 th and 12th. I completed my 12th
with 61.54% from Sanjivani College of Science, Kopargaon.
If I go on and talk about myself……
I am completely passionate about computers and other electronic devices. There are three
members in my family. I am the only child to my parents. My parents have a business of
xerox shop. They both work hard for me. My parents have been pillar of strength in my life.
I can sum up my entire personal and professional life in three words. “I can win”. That’s all
about myself. Thank you!!!

About Project
Project Overview
In my final year of IT engineering, I worked on a healthcare project focusing on PCOS and
breast cancer detection. Our team of four developed a website that utilized machine learning
algorithms to assist in early detection.

My Role
I was responsible for compiling the project, presenting it to our faculty, and writing the
project report. I also handled the technical explanation and demonstrated the functionality of
the website.

Technical Explanationsx6
PCOS Detection:
For the PCOS detection, we used the SVM (Support Vector Machine) algorithm. We input
various parameters like haemoglobin, blood pressure, and other clinical features. The system
compares this data with our trained dataset. If the data points match the patterns in the
dataset, the system shows the message ‘PCOS Detected,’ otherwise ‘No PCOS.’
Breast Cancer Detection:
For breast cancer detection, we used a Convolutional Neural Network (CNN) model. This
model was trained on medical images. The user uploads a breast scan image, and the system
predicts whether breast cancer is detected or not, showing a message ‘Breast Cancer
Detected’ or ‘Breast Cancer Not Detected.’

What is object-oriented programming?


Object-Oriented Programming (OOP) is a paradigm that organizes software design around
objects and classes. It allows developers to model real-world entities using attributes (fields)
and behaviors (methods). OOP principles like inheritance, polymorphism, encapsulation, and
abstraction promote code reuse, scalability, and maintainability.

Python, CPP, Java

What is JAVA?
Java is a programming language that is primarily used for internet applications. It is one of
the most commonly used and is platform-independent, meaning you can develop it on one
machine and use it on another.

Can you explain what JVM is? Can you use this on any platform that you
choose?
JVM stands for Java Virtual Machine. You need the JVM to run any Java application.
Without it, the application fails and the user is unable to access it. This specification compiles
Java code to Bytecode, which is closer to the computer's code.

Can you explain the concept of AJAX and when it’s advantageous to use it
in your code?
AJAX (Asynchronous Javascript and XML) pulls data into a web page without needing to
refresh the entire page. AJAX is not a programming language. I typically use this when I
want to have an endlessly loading page for users.
Explain public static void main(String args[]) in Java.

Unlike any other programming language like C, C++, etc. In Java, we declared the main
function as a public static void main (String args[]). The meanings of the terms are mentioned
below:

1. public: the public is the access modifier responsible for mentioning who can access
the element or the method and what is the limit. It is responsible for making the main
function globally available. It is made public so that JVM can invoke it from outside
the class as it is not present in the current class.

2. static: static is a keyword used so that we can use the element without initiating the
class so to avoid the unnecessary allocation of the memory.

3. void: void is a keyword and is used to specify that a method doesn’t return anything.
As the main function doesn’t return anything we use void.

4. main: main represents that the function declared is the main function. It helps JVM to
identify that the declared function is the main function.

5. String args[]: It stores Java command-line arguments and is an array of type


java.lang.String class.

Explain different data types in Java.


Primitive Data Type: Primitive data are single values with no special capabilities. There are
8 primitive data types:

 boolean: stores value true or false

 byte: stores an 8-bit signed two’s complement integer

 char: stores a single 16-bit Unicode character

 short: stores a 16-bit signed two’s complement integer

 int: stores a 32-bit signed two’s complement integer


 long: stores a 64-bit two’s complement integer

 float: stores a single-precision 32-bit IEEE 754 floating-point

 double: stores a double-precision 64-bit IEEE 754 floating-point

Non-Primitive Data Type: Reference Data types will contain a memory address of the
variable’s values because it is not able to directly store the values in the memory. Types of
Non-Primitive are mentioned below:

 Strings

 Array

 Class

 Object

 Interface

What are operators?


Operators are the special types of symbols used for performing some operations over
variables and values.

How many types of operators are available in Java?


All types of operators in Java are mentioned below:

1. Arithmetic Operators (+, -, *, /, %)

2. Unary Operators (x++, x--, ++x, --x)

3. Assignment Operator (+=, -=, /=, *=, %=)

4. Relational Operators ( <, >, <=, >=, ==, !=)

5. Logical Operators (&&, ||, !)

6. Ternary Operator ((x > y) ? 30 : 40)

7. Bitwise Operators

8. Shift Operators

9. instance of operator
What is an array in Java?
An array is a data structure that stores a collection of elements, typically of the same data
type, in a contiguous block of memory. Each element in an array can be accessed by its
index, starting from zero. Arrays are useful for storing multiple values under a single name
and can be used to organize data in a structured way.

An Array in Java is a data structure that is used to store a fixed-size sequence of elements of
the same type. Elements of an array can be accessed by their index, which starts from 0 and
goes up to a length of minus 1. Array declaration in Java is done with the help of square
brackets and size is also specified during the declaration.

What is a constructor in oop?


Constructor is a special type of method where class name is same as constructor. The main
purpose of constructor is to initialize object. Every java class has a constructor. A constructor
is automatically called at the time of object creation. A constructor never contain any return
type including void. Even if you haven't specified any constructor in the code, the Java
compiler calls a default constructor.

Types of constructor
1) Default constructor
2) Parameterized constructor
3) Copy constructor
4) Private constructor

What is a default constructor in Java?


A default constructor is a constructor without parameters. If a class has no constructors, the
Java compiler automatically provides a default constructor. This is called an implicit default
constructor.

Int = 0, string = null, boolean = false.

What is a parameterized constructor in Java?


A constructor through which we can pass one or more parameters is called parameterized
constructor.

What is copy constructor in Java?


Whenever we pass object reference to the constructor then it is called copy constructor.

What is private constructor in Java?


In java it is to write private constructor but according to the rule we can not access private
members outside of class.

What are the differences between the constructors and methods?


Java constructors are used for initializing objects. During creation, constructors are called to
set attributes for objects apart from this few basic differences between them are:

1. Constructors are only called when the object is created but other methods can be
called multiple times during the life of an object.

2. Constructors do not have a return type, whereas methods have a return type, which
can be void or any other type.

3. Constructors are used to setting up the initial state but methods are used to perform
specific actions.

Explain the difference between the static method and the instance method.
Instance method are methods which require an object of its class to be created before it can
be called. Static methods are the methods in Java that can be called without creating an object
of class. Static method is declared with static keyword.

A static method belongs to the class itself rather than to an instance (object) of the class. This
means it can be called without creating an instance of the class. An instance method belongs
to an object of the class. To call an instance method, you need to create an object of the class.

A static method can only access static variables (class variables) and other static methods. It
cannot directly access instance variables (object-specific variables) or instance methods
because it doesn’t belong to any instance. An instance method can access both instance
variables and static variables. It operates on the instance of the class it belongs to and can
modify both object-specific and class-level data.
How do you use the "this" keyword in Java?
The this keyword refers to the current object in a method or constructor. It is a reference
variable.

Explain the Inheritance and its use in Java.


Java, Inheritance is an important pillar of OOP(Object-Oriented Programming). It is the
mechanism in Java by which one class is allowed to inherit the features(fields and methods)
of another class.

In java Extend keyword is used to perform inheritance. It provide code reusability. We can’t
access private member of class through inheritance.

Example is school management system (student, teacher, staff)

Explain the types of Inheritance?


Single Inheritance : In single inheritance, a subclass inherits from a single superclass. This is
the simplest form of inheritance and forms a parent-child relationship.

Multilevel Inheritance : In multilevel inheritance, a class is derived from a class that is


already a subclass of another class. This forms a chain of inheritance.

Hierarchical Inheritance : In hierarchical inheritance, multiple subclasses inherit from a single


superclass. This allows various child classes to share the functionality of the same parent
class.

Multiple Inheritance : Although Java does not support multiple inheritance through classes to
avoid ambiguity, it allows multiple inheritance using interfaces. A class can implement
multiple interfaces, thereby inheriting their behavior. (Java does not support multiple
inheritance (where a class can inherit from more than one class) to avoid ambiguity and
complexity. if two parent classes have a method with the same name, and a child class
inherits from both, Java wouldn’t know which method to call. This issue is often referred to
as the "Diamond Problem.)

Hybrid Inheritance : Hybrid inheritance is a combination of two or more types of inheritance


(e.g., single and multiple inheritance). Since Java doesn't support multiple inheritance
through classes, hybrid inheritance can be achieved indirectly by using interfaces. For
example, a combination of hierarchical and multiple inheritance.

Explain the Polymorphism and its use in Java.


Polymorphism is a greek word whose meaning is same object having different behaviour.

1. Compile time polymorphism : A polymorphism which is exist at the time of


compilation is called . Example is method overloading.(Same name different
parameters)
2. Runtime polymorphism : Polymorphism which exist at the time of execution
of programme is called as. Example is method overriding. (Same name same
parameters)
 Example is person (Student, husband, Father)

What do you mean by data encapsulation?


Encapsulation is a mechanism through which we can bind the class variable and class method
of class in a single unit called as encapsulation. We have to declare class variable as a private.
And declare the class method as public. For example class.
Example is Atm machine

What are the advantages of Encapsulation in Java?


The advantages of Encapsulation in Java are mentioned below:

1. Data Hiding: it is a way of restricting the access of our data members by hiding the
implementation details. Encapsulation also provides a way for data hiding. The user
will have no idea about the inner implementation of the class.

2. Increased Flexibility: We can make the variables of the class read-only or write-only
depending on our requirements.

3. Reusability: Encapsulation also improves the re-usability and is easy to change with
new requirements.

4. Testing code is easy: Code is made easy to test for unit testing.

What is Abstraction?
Abstraction is a process of hiding the complex implementation details from the user only the
highlighted set of services is provided to the user.

Example is mobile phone(send message, make a call.)

Explain method overloading in Java?


Method overloading in Java means having two or more methods (or functions) in a class with
the same name and different arguments (or parameters). It can be with a different number of
arguments or different data types of arguments.

When two or multiple methods are in the same class with different parameters but the same
name.

Which is better in C++ and Java


 C++: Generally faster because it allows direct memory management. Good for
performance-critical applications like games or system software.

 Java: Slower due to running on the Java Virtual Machine (JVM), but still performs well
for most applications.
 C++: Code needs to be recompiled for different platforms.

 Java: Write once, run anywhere. Java code runs on any device with a JVM, making it
highly portable.

 C++: More complex due to features like pointers and manual memory management.

 Java: Simpler and more beginner-friendly, focusing on object-oriented principles.

 C++: Supports multiple inheritance, which can complicate design.

 Java: Strictly object-oriented and avoids multiple inheritance for cleaner code.

 C++: Platform Dependent

 Java: Platform Independent

What is string?
A String is a sequence of characters (like letters, numbers, and symbols) used to represent
text.

 Immutability:

Strings in Java are immutable, meaning once you create a String, you can’t change it. If you
modify a String, a new one is created instead.
What is Pointer?
A pointer in programming, especially in languages like C and C++, is a variable that stores
the memory address of another variable. It "points" to where a value is stored in memory,
rather than storing the value directly.

Difference Between for loop and while loop


 Use: A for loop is typically used when you know in advance how many times you want to
iterate.

 Structure: The for loop iterates over a sequence (like a list, string, range of numbers, etc.)
or runs for a fixed number of iterations.

 Use: A while loop is generally used when the number of iterations isn’t known
beforehand. It continues to loop until a certain condition is false.

 Structure: The while loop keeps executing the block of code as long as the condition is
True

What is Palindrome?
A palindrome is a word, number, phrase, or sequence that reads the same backward as
forward. Here's a simple example of checking if a string is a palindrome in Java:

What is SQL and its commands?


SQL (Structured Query Language) is a standard language used to interact with relational
databases. It allows users to create, retrieve, update, and delete data stored in relational
databases such as MySQL, PostgreSQL, Oracle, and Microsoft SQL Server.

SQL Commands

SQL commands are categorized into different types based on the tasks they perform. These
commands are broadly classified into the following categories:

1. Data Definition Language (DDL)

DDL commands are used to define the structure of the database, including creating,
modifying, and deleting tables and other database objects.

CREATE, ALTER, DROP, TRUNCATE.


2. Data Manipulation Language (DML)

DML commands are used to manipulate data in the database. These commands deal with
inserting, updating, deleting, and selecting data.

INSERT, UPDATE, DELETE, SELECT.

3. Data Control Language (DCL)

DCL commands are used to control access to data in a database. These commands help in
managing the security of the database.

GRANT, REVOKE.

SQL QUERIES

You might also like