Wednesday, December 2, 2009

What is System class in Java

Class System provides a standard place for programs to find system related information.

Friday, November 27, 2009

Nice Java puzzle..

Nice Java puzzle..
Came across the following puzzle.
http://whyjava.wordpress.com/2009/09/24/java-puzzlers-are-asked-in-interviews/

Thursday, June 25, 2009

coep wins Microsoft imagine cup

Great job done by 3 coepians:

http://www.sakaaltimes.com/2009/06/25125227/COEP-wins-Microsoft-Imagine-Cu.html

Hats off to them!!

Wednesday, June 17, 2009

Mock interview questions for Cdac

Hi..
I had chance to interact with CDac students who were preparing for final exams.

During the discussion, we pondered on following questions

a. What is difference between HTTPServlet and GenericServlet.

b. What is difference between ServletConfig and ServletContext.

c. Create a web page application which can navigate to three pages via a link. like Page A - > Page B -> Page C and vice versa.

Sunday, February 8, 2009

GD techniques

Yesterday, I had chance to discuss with CDac students and many were curious to know about GD techniques.

Once can view GD as consisting of three phases and one has to keep an eye on each of three phases.

I. Initiation / Introduction
II. Body of the Group Discussion
III. Summarization / Conclusion




http://www.indiastudychannel.com/resources/10665-Successful-Group-Discussion-GD-Tips.aspx
http://www.coolavenues.com/mbasp/brijesh_initiation_2.php3

Thursday, January 8, 2009

Class Reference from default package

Just a issues to ponder on..

I've two classes. One class is without package structure and other with package structure. Now if update the second class class to have reference to class without package structure, I'm not able to compile the class with package structure.

Is this a Compiler limitatoion.. ? Its looks so but I need to confirm..
Found a reference: http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=5a33c13c69c24bf0e9888042287?bug_id=4650921


What do you think about this..

Thursday, January 1, 2009

Practical Java : Wrapper implementation on Collections

Wrapper implementation on Collections is good feature to know in Collections framework..

There are 3 distinct wrappers implementation on collections.
a. Synchronized Wrappers.
b. Unmodifiable Wrappers
c. Checked wrapper

Synchronized wrapper enables to add synchonization to collections. So for example if you have arrayList which is by default not threadsafe can be made Thread-Safe by using the Synchronized wrappers.

Ex: List list = Collections.synchronizedList(new ArrayList());

Note here that Collections is Class and not Collection interface.

These are normally based on Decorator pattern and since synchronized wrappers add a level of indirection which can have a high performance cost.

Next post will look more into Practical usage of Synchronized wrappers and where it should be used?