Archive for July, 2006

Easiest way to browse and search Open Source code

Jsourcery  – You are in the middle of coding something and want to see how that functionality is implemented in one  of the open source projects that you know. Then this site is for you. This site has an impressive list of java open source projects to browse through.

If you are looking for a google search like functionality that can search through open source code repositories, then check out these sites,

Comments (1)

Looking for UML quick reference.. ?

Then checkout this link, http://www.holub.com/goodies/uml/

Leave a Comment

Coolest way to create resume

I came across this cool new website for creating and hosting resumes, http://www.emurse.com. The site has very intuitive user interface and can generate resume in multiple formats.
Checkout my resume,

Resume Links:
WEB
DOC
PDF
RTF
ODT
TXT
HTML

Leave a Comment

My NerdTest scorecard

I am nerdier than 88% of all people. Are you nerdier? Click here to find out!

Leave a Comment

Two interesting java questions

Q1. Can we write constructors in servlets ?

Ans. Container creates servlet instances using its no-argument constructor.  So the answer is, You can write constructor but, if you write a constructor with arguments, you need to provide a no-arg constructor also.

Q2. Why do we use init method to initialize a Servlet ? Why can’t we use constructor ?

Ans.  B’cose interfaces don’t allow to specify constructor signatures.  This is a bit high level answer. All servlets either directly or indirectly implements the GenericServlet interface.  In other words, you define the rules that a servlet should follow using the GenericServlet interface. But, how do you specify that a ServletConfig object should be passed as argument when creating a Servlet instance. You can’t declare a constructor rule in interface.
You can’t do this,

public interface GenericServlet {

public GenericServlet(ServletConfig sc) {

}

}
So the only way is to define a seperate init method. The name init is arbitrary, just a meaningful name.
public interface GenericServlet {

public init(ServletConfig sc) {

}

}

Leave a Comment