Showing posts with label Java Interview Question. Show all posts
Showing posts with label Java Interview Question. Show all posts

Wednesday, July 27, 2011

Java and Web service interview questions: - What are the different approaches in making Web service?

An interesting Java interview question asked in most of the interviews while
discussing topic on web services. There are basically two approaches in making
web service: -

1) WSDL first Implemention second: In this case the Web service definition
language XML is made first and using the same the web service bean classes are
generated which implement the necessary functionality

Since WSDL defines Contract this is also known as Contract first


2)Implementation first WSDL second: This approach is used whenever legacy code
is available which needs to be exposed as service. So here implementation is
already available and hence only contract needs to be created using WSDL.

Following is the introductory video on Webservice for the one's who are new to
this topic: -






View more video on Java interview questions

Regards,

Click for more author's Java interview questions



Monday, March 28, 2011

.NET and Java J2ee Design pattern interview question: - What is the difference between Template and Strategy pattern

Answer:
Below are the main differences between these two design patterns: -

Template Design pattern

Defines outline for algorithms and allows sub class to override some steps.
Efficient in terms of less redundant code.

Depends on super class for methods.

Strategy Design pattern

Uses object composition to provide variety of algorithm implementation.
Flexible in terms of allowing users to change algorithm at run time.

All the algorithms can be itself implemented.

Regards,

Do visit our .NET design pattern and Java J2EE design pattern interview questions.

Wednesday, March 23, 2011

.NET and Java J2ee Design pattern interview question :- What is the difference between Decorator and Adapter pattern?

Answer:
Below is the main difference between these two design patterns.
Decorator Design pattern
Used to deal with new behavior or responsibilities without affecting existing code.

Provides a wrapper over objects to apply same method which yields different results based on whether the object invoked is granular or composite.

Change of interface does not happen.

Adapter Design pattern

Mainly involved in converting interfaces as per the requirement of client

Allows use of new libraries without changing existing methods

Change of interface happens in this case

Regards,

Do visit our .NET design pattern and Java J2EE design pattern interview questions.

.NET and Java J2ee design pattern interview question :-What is the difference between Object and class adapters?


Answer:

Below are the main difference between these 2 patterns.
Object adapter
Can adapt classes as well as sub classes since uses composition

More flexible since dynamic polymorphism can be used with composition
Class adapter

Can adapt classes or sub classes not both. As a result no need to re implement the entire adaptee
More efficient since class adapter acts as adapter and adaptee

Please do visit my .NET Design patterns and Java J2EE design pattern interview questions

Friday, September 28, 2007

Customer review for Java Interview questions on Amazon

Average Customer Review:Write an online review and share your thoughts with other customers.
Got a job Thanks and awesome book, 28 April 2007 By Rajeshri "Rajbookreader" (India) - See all my reviews
I will say awesome book. Yes the english is not good but who cares in the technical world. Best part i liked about it is that it covers question other than technical like project management , design patterns etc....Overall a good book and the best material for prepration Was this review helpful to you? (Report this)

great preparation material., 19 April 2007 By Mr. S. J. Lee "Simon Lee" (London) - See all my reviews

I'm pretty sure that if I were to try & write a book in a foreign language, the grammar would be many orders of magnitude worse than this book. Ok, so the reason you're looking to buy it is that you want realistic interview preparation material.. this is the book. lots and lots (400 or so) of realistic interview questions - but - the answers leave a lot to be desired.


==================

I promise will improve in the next edition

Wednesday, February 28, 2007

Funda of second hand books

Funda of second hand books
Some times back i was looking at one of the small gully book shops and saw a huge stock of second hand books like Let US C , JAVA , Bala guruswamy etc etc. Just asked the shopkeeper how do these books do. Pat he answered sells 2 copies every day for every book. Started my thinking all over India there must Lakhs of small shops like this.....Wondered the second hand books profit can not be enjoyed either by the publisher or the author. Yes the gulliwala is definelty under profit thats a different thing. But here are some of the tips which i learnt from Manish Jain BPB how to handle the same :-

Keep revising editions which are best sellers. For instance my .NET Interview sells approx 20 thousand copies a year and SQL Server hardly 5000. That means second hand copies of .NET will be available easily in 3 years time span in such local shops.So i always keep updating .NET on year basis and SQL Server every 4 years.
I really appreciate the depth knowledge what Manish has abot Indian Computer book Market.