You are on page 1of 5

General Questions:

1. Memory Leaks -- what is it ? causes and how to avoid?


2.

Java reflection is a standardized Java API that you can find in the "java.lang.reflect" package. It
makes it possible to do introspection of classes and objects. You can query a Java class about its
properties, methods, constructors, etc... The reflection feature also allows you to operate on each
of them.
Java reflection does have a downside though: degraded performance. The reflection
functionality requires the Java VM to do additional analysing of classes and objects that would
normally not be necessary during run-time: this would already have been performed during
compile-time by the Java compiler.
Conclusion:
Using reflection requires has the advantage of more flexibility at the cost of the overhead of more
time needed to execute code.

Java Questions
Lang
IO
Threads
Applets
Collection

Difference between a class with static method and a singleton pattern ?


Abstract Classes Vs Interfaces
1. Inter. used where design would change/Abs.clas to be used where partial
implementation can be provided.
2. Interfaces provides multiple inheritence.(Interface inheritanceVs
Implementation Inheritance)In cases where the interface provides a
supplemental support(peripheral ability not core identity--not main fn.) ,
should be interface like serializable/comparable etc.(Thread/Runnable)
3. Cant add new methods to interfaces at later stage will break other classes.
(need to get right at first time)
4. No mutable fields in interfaces
5. Interfaces define a contract a specification for reqd. behaviour

6. Ideal design : combination of Interfaces and Abs. Classes like : List &
Collection/Abstract List and then Linked List/Array List etc.

Why Multiple Inheritence was removed ? how it can be implemented ?


Polymorphism
How to avoid if-else/switch stmts in code.
Factory code will have if-else ??
Pointers in java

JDK 1.4 featuress ??


Logging
Reg Ex

JDBC Questions

JSP Q
<!ELEMENT web-app (icon?, display-name?, description?,
distributable?, context-param*, filter*, filter-mapping*,
listener*, servlet*, servlet-mapping*, session-config?, mimemapping*, welcome-file-list?, error-page*, taglib*, resourceenv-ref*, resource-ref*, security-constraint*, login-config?,
security-role*, env-entry*, ejb-ref*, ejb-local-ref*)>

Servlet Q
RMI Questions
XML Q
Struts Q
App.Servers:
Weblogic
Jboss

Orion
Databases
SQL Standards
Stored Procs.
Triggers
Joins
Oracle 9i/MySql
Compilers:
JIT
Classic
HotJVM ???
UML

Difference between Association / Composition / Aggregation


All are has-a type relation ship.
Association is a relation in which one instance can send a message to another
Either through maintaining a reference/ argument or a local variable.
Association is a long term relationshp ???
( Employee and company )
Composition and Aggregation are Whole/Part relation ships.
(Eliminates the cyclic relationship)
Composition there is a strong link between the Whole & Part.
If the whole is deleted, the Part has no individual existence(same lifespan)
Whole is not complete without the Part .
Composite part cannot participate in more than one composite
relationship
Aggregation : weak link. The Part can stay independent of the whole even
when whole is deleted (different life span) .Aggregated part can participate in
n aggregations.

Design Patterns
Java script
Misc. tools
Build tool
ANT
Unit Testing
Junit
OR Mapping Tool
Cocobase
Hibernate
IDE:
Other lang:
C/C++
VB
Certifications
1. SCJP
2. SCWCD -- 15
3. IBM UML -- 20
4. XML -- 25

I ask programmers about OO. Questions like:


"difference between subtyping and subclassing."
"interface and abstraction"
specific questions about the IDE they are going to use.
explain a concept of something like EJB, servlet.
With senior developers I can ask about patterns and so
Some examples of the tougher questions I like to ask: when to use inheritance
versus composition and delegation, what is encapsulation (this should lead on to
more probing questions about defensive copying and immutable objects), compare
pass-by-value to pass-by-reference, discuss type-safe constants/enums (and any
issues with using them in a distributed environemnt), what design patterns did you
utilise in your last project (and then probe deeper about why they used each pattern,
how they were implemented, and the trade-offs involved). For developer db

questions I like to ask about normalisation, inner and outer-joins, nested subqueries, correlated (repeating) sub-queries, views, stored procedures, optimisation
of queries, how transactions are handled in the database they are most familiar with
(including transaction isolation levels), multiuser concurreny issues (optimistic and
pessimistic locking strategies)
will have to use on your project and which they have stated on their CV. I always
think that if it is down on the CV, then it is a licence to grill! But I still like to start
with easy questions and then build on these. E.g. asking about execeptions in EJB:
To start with I ask about the different types (i.e. Application Exceptions, System
Exceptions, Checked Subsystem Exceptions), then I ask tem to go into detail about
what these mean and how they are treated by the container and how the developer
should handle each of these. It is then informative to ask about how Application
Exceptions were handled on their last project - i.e. did they have a base application
exception that they extended, how was logging handled, etc. Other questions I'd ask
about EJB include: What method of persistence did they use (and go into detail of
the implementation issues, alternatives that could have been used, advantages and
disadvantages), if they used entity beans I'd ask about inheritence issues and
workarounds, what container specific functionality they'd used and why, what J2EE
design patterns had they used (and again I'd ask why they used each pattern, how
they were implemented, and the trade-offs involved), what restrictions are there on
EJBs (and see if they understood why those restrictions were there, and also ask if
they thought helper classes had the same restrictions).
I like to ask open-ended questions like: "Tell me about a tool or technique you have
come across recently that has improved your work or your productivity". "What
issues do you think represent the greatest risks for developing a successful product."
"Tell me about some things that went right on your last project, and some things that
went wrong, and why?". "Describe and ideal environment for software development".
"Tell me about your philosophy for testing software". "Do you read any industry
periodicals (and tell me about a recent article)".
And how they will handle scenarios that are possible in your work environment
(delving for non-trivial answers): "What would you do when you realize that
someone on your team was slipping well behind schedule". "What techniques do you
use to estimate the amount of time it will take you to complete a unit of software".

You might also like