Sie sind auf Seite 1von 3

class.

Convert this post to your Language

Select Language

Q. Is this possible to write final method in abstract class?

Join us for new Posts

Ans : Yes, you can do this by using non abstract methods.


with Google Friend Connect

Members (12)
Q. What is Difference between Iterator and ListIterator?
Ans : Both are used to retrieve the data from collection. Iterator only traverse in forward direction,
but ListIterator can traverse in both forward and backward direction. ListIterator has
hasPrevious() and previous() method which is not available in Iterator.

Already a member? Sign in

Q. Difference between synchronized block and synchronized method ?


Subscribe By Email

Ans : Synchronized Method defines a self contained block and its easy to handle in multithreaded environment. Both act as similar; there is no major advantage over each other. The
difference is that a synchronized block can choose which object it synchronizes on. A
synchronized method can only use 'this' (or the corresponding Class instance for a
synchronized class method).

Feed This

Sapient Interview Questions and Answers for


Java 2 - 6 Year
Experience - 2/11/2015 - Manoj Kumar
Bardhan

Q. Difference between String and StringBuffer class ?


Ans : String is immutable, but StringBuffer is not. StringBuffer used to represent characters that
can be modified. StringBuffer is faster when performing concatenations. This is because when
you concatenate a String, you are creating a new object (internally) every time since String is
immutable.

Q. How to get the session object in jsp?


Ans : By using implicit object session. You can use session.getAttributes() methods.

How to skip test case in Maven build


? - 12/21/2014 - Manoj Kumar Bardhan
How to create maven job in
Jenkins - 12/21/2014 - Manoj Kumar Bardhan
Detecting the current branch failed: fatal: ref
HEAD is not a symbolic
ref - 12/17/2014 - Manoj Kumar Bardhan
SEVERE: Catalina.start:
org.apache.catalina.LifecycleException:
Failed to start
component - 11/29/2014 - Manoj Kumar
Bardhan

Blog Archive

Q. How to get the session factory object in hibernate?


Ans : By the use of buildSessionFactory() method .Syntax as below.

2015 (1)
2014 (20)
December (3)
November (1)
October (2)
September (8)

SessionFactory factory= new Configuration().configure().buildSessionFactory();

August (2)
July (1)

Q. How to handle the runtime exception in jsp?

June (2)
March (1)

Ans : In jsp page directive you can use isErrorPage=true.


2013 (9)
2012 (43)
2011 (35)

Q. Difference between method overloading and overriding?


Ans : Both are concept of polymorphism. Method overloading is a form of static binding. Method
overriding is a form dynamic binding. Overloading is applied in single class, but overriding is
applicable for inherited class. Method overloading is always specific to method signature. It
defines number of parameter, type of parameter and sequence of parameter.

All Posts

core java (21)


Database (23) Database Backup

(7)

design partten (4)

HTML (12)
Q. Difference between java.util.date and java.sql.date ?
Ans : As we know every database support most three form of entry i.e. date, time and
timestamp. In java JDBC having all those supports using java.sql.Date, java.sql.Time,
java.sql.TimeStamp. Internally all these JDBC classes extends java.util.Date.

Interface (4) Interview


Questions (8)
J2EE (8)
Java Script (10)
JSP (4)
JVM (5) JVM Advance Setting (5) JVM
Errors (6)

MYSQL (30)
Question Answer (4)
Servlet (5)
Struts (6)

SQL (16)

Q. I have 1 to 100 elements in array unordered, one element missed find that one?
Ans : There is existing old formula. Calculate the sum of all numbers stored in the array of size 11
means it hold 12 data. Then, subtract the sum from (12 * 13)/2

Popular Posts

Capgemini Interview Questions and Answers

Das könnte Ihnen auch gefallen