Recently asked Capgemini Technical Interview Questions with Answers

If my class is having 5 abstract methods then can I make it as an interface?
Yes

Can I display  logging messages on the console?
 Yes

 Which cvs tool are you using? What are the methods that are there?

Commit().  
Update()

When I don’t want to commit the ResultSet obj content, what to do?

Con.setAutoCommit(“false”);

Difference between Checked & Unchecked Exception?
Checked Exceptions: Checked Exceptions deal compile time exception regarding the existence of  classes/interfaces But not syntax errors.
Ex:  ClassNotFoundException---when use a NULL referenced variable to call any  method/variable.
InterruptedException,---when two or more threads try to share same Resource(wait() and join())
NoSuchFieldException ---when we access the undeclared variable
NoSuchMethodException---when we invoke the undeclared method.
InstantiationException---when we try to create object for a abstract/interface
Unchecked Exceptions : deal runtime errors.
 Ex: ArithmeticException,
      ArrayOutOfBoundsException,
      NullPointerException
 

What is polymorphism?
Poymorphism is the capability of an action/method to do different things based on an object that it is  acting upon.One form, many implementations.

What is overloading and overriding?

Overloading is the process of re-defining a method for multiple times with different Signature.
Overriding is a process of re-defining a super class original version in its various derived classes through inheritance.

What is Encapsulation & abstraction?
Encapsulation is, a technique, used to encapsulate the properties &  behaviors of an object. It focuses on inside-view and solves problems at “implementation side”.
Abstraction refers to the act of representing essential features without including the background details

What is final ?
class, method, variable.

How can you invoke a current class constructor from a method ?
Using “this”.

How can you invoke a super class constructor from derived class?
Using “super()”

What is “static”?
method, variable, block, static nested class

What is “instanceOf”?

The operator that checks whether given instance is belongs to the given class or not.

Can I create an interface without methods, constants declarations?
Yes

Can I place try & catch blocks in finally block?

Yes

How can you make an ArrayList as Synchronized list?
List lobj=Collections.synchronizedArrayList(new ArrayLsit());
Map m=Collections.synchronizedMap(new HashMap());

What is Serialization?
Writing the state of an object in to Streams.

How can you made the fields of a class to not serialized?
Using the modifier called “transient”

What is the use with Generics?
It avoids explicit type casting.

What is “Reflection”?
It allows to do Mirror image operations on classes/interfaces to get the internal details.

How do you maintain versions in your project?
Using SVN.

What is Junit?

A tool for unit testing.

Search:

Recent Posts