IFlex Java Interview
Company IFlex
Mode Telephonic
Duration 35 minutes
Contributed By Satya Narayanan
Candidate's Profile 4+ Years of Exp in Java and J2EE

I am Ganesh calling from IFlex. There is an interviewed scheduled with you.
Yea Ganesh. Good Morning.

Good Morning Satya. Can we have the interview now?
Yea Pls go ahead.

Ok. Tell me about yourself.
I am Satya working for HCL. I have been working here for the past 2 years. I did my graduation and post graduation in Loyola. I am a Sun certified Java Programmer. I have mostly worked on financial domain related projects. I am married and have a small baby boy.

Can you tell me more about your current roles and responsibilties.
My role is that of a senior software engineer. Most part of job responsibilities involves coding and related actvities.

Can you explain the architecture of your current project.
......explained the architecture....

Don't you use DAO's?
Yes we do use. There is a small java layer called Helpers which act's as DAO.

Are you familiar with Design patterns?
I have not formally gone through design pattern's but i am comfortable at whatever pattern's we are using.

Ok. Can you name few pattern's that you are familiar with.
Singleton, ServiceLocator, ControllerServlets, Session facade, Transfer Object, hmmm..

Can you explain about Singleton?
Singleton..Whenever there is a requirement to create only one object for the whole JVM, we go in for singleton's. Basically this is like where we have some configuration data which is not going to change frequently and required across the whole application then we create a single object at start up.

So how will you acheive this?
Basically a singleton's constructor should be declared as private. There should be factory method which will return the instance of the class. The factory method should be sychronised and static. In the method, we should check if an instance of the class already exists. If not we should create the object and return the instance.

How is the data transfered between the client and the server?
We have something called TravelingObject which actually is a Transfer Object. We construct this and send it across to the server.

Whats the properties of a Transfer Object?
It should be able transferable over network ie it should be serialized. Ideally it shoudn't have any getter or setter methods.

Can you explain on how Applet to Servlet Communication happen?
First we have to create an instance of URL by passing the server url. Then we have to create instance of URLConnection by invoking openConnection on URL instance. Set the required properties on the url connection. get the outputstream of the url connection then write the data.

ok. How do you handle Applet security?
Most part of the applet security is handled by using java.security and java.policy files.

Have you worked on JSP's?
No not much. But i know.

What database are you using?

Which version?

How do you rate yourself in core Java?

Can you explain about exception handling?
Exception Handling means we need to have try catch finally block. Exception Handling should be part and parcel of a decent code.

I am asking about Exceptions hierarchy..
Throwable is the base class. Exception is the immediate subclass. There are 2 types of exceptions.. checked and unchecked..

Do we need to handle Errors?
Error's need not be handled. Error's are thrown when there is something critically wrong. Basically, it's well enough to handle exception's alone.

There is a Class A and a method called a1. And there is another class called B which extends A. There is method a1 in class B. Is there any on restrictions on a1 method class B?
Class B is actually overriding the method a1 of class A. Hence method signature and return type should be same as a1 in A. The exceptions thrown should also be the same or subclasses of the thrown exception in the base class method.

How will you make a class immutable. We know String's are immutable. How to achieve this for your own class?
I haven't thought on these lines. But i think it should be achieved using singleton's. I am not really sure.

What classes have you used in collection framework?
Vector, Hashmap,Hashtable,etc

Whats the difference between Enumeration and a Iterator?
Both allow us to iterate through a collection but Iterator allows us to remove a element from the operating collection whereas Enumeration doesn't.

Can we define an interface inside a class?
I am not really sure.

Ok. Can we define a class inside a interface?
Interface provides abstraction and Classes provide concreteness. Both of the questions look twisty. May be these are possible. But I haven't tried these. I am not really sure.

Say i am using servlets as controllers and I want to enable or disable the encryption dynamically. How will you acheive this?
We have to use servlet filters.

What is the difference between forward and sendRedirect?
Both are actually used to transfer the request to a new url. forward is used to send the request to new within the same web container whereas redirect is used to send the request to a new web server. With sendRedirect the call will reoriginate from client browser.

How do you handle transaction's in jdbc.
using begin and commit methods.

I want to open connection to Oracle and SQL Server in the same method? Will this be possible?
I haven't tried but it should work.

Can you explain it?
When we want to open a connection, we load the drivers and pass the db type and other relavant information. Hence there will two connection objects and it should work.

Have you used CallableStatement?
No. I haven't.

How comfortable are you in EJB?
Yea i am good at it.

Whats the difference between local and remote interface?
Local interfaces are used when we dont want the bean to be distributable. Local Interfaces use "pass by reference" whereas Remote Interfaces communicate by "Pass by value".

What are home business methods?
Home business methods is a feature introduced in EJB2.0 which allows to define a business method in a home interface. These business methods are generally aggregate methods which are not specific to particular to a entity bean.

Can you give me an example for the same.
sum of all account balances is a good candidate for home business methods.

Ok Satya. I am through with my questions. Do have any questions to me?
When will i know the outcome of this interview.

You will be updated within 30 minutes by the HR team.
Thanks Ganesh.

Thanks Satya for your time.

If you wish to share your interview experience, send us the entire interview questions with answers to admin@javaiq.net. The questions should be in the same order as it was asked in the interview. We will review your interview stream for originality and correctness, after which the stream will be uploaded.

java interview guide If your interview submission is selected, we will send a gift card for "$25" .

  • This offer is available only for contributors from USA and India.
  • Gift Card worth is Twenty Five US Dollors or it's equivalent
  • The content sent by the contributor becomes the property of JavaIQ.net
  • This offer can be withdrawn without any prior notice.
  • The decision of the JavaIQ team will be final.