Monday, August 24, 2009

PHP Framework - CodeIgniter

After working in Java for a couple of years I was more or less in love with the nice frameworks the language has Spring, Hibernate, Struts to name a few this was something which I always felt was missing in PHP, I have herd quite a lot about cake but never used it, I tried learning symfony some time back but it was kinda difficult to learn and implement, recently was working on a project at my home, and I started looking for options that I had for PHP frameworks, I came across this new name CodeIgniter, I had a look at its video tutorial, it looked fantastic in first sight, I started using it in my project, after having it used for a around a month I now feel that PHP no more lacks a quality framework, I don't know about others but CodeIgniter is really cool.

Saturday, August 22, 2009

Java Interview Questions

I was recently interviewed for a project, here is a log of questions.
Threads
1. Threads have priorities 1 to 9, which is the highest and which one is the lowest.
2. I have a class which has two methods add and subtract, both the methods are synchronized, a thread went into add method and the same time another thread tries to get into subtract method, which it wait for first thread to complete add or will it go into subtract thread.
3. What are critical sections.
4. Which one is a better practice to have functions synchronized or to have synchronize block.
5. What are the different states that a thread goes through.
Servlets & JSP
1. what are servlet config and servlet context, how are they different than each other.
2. What are the different ways of maintaining session.
3. How do we maintain session in a clustered environment.
4. Describe life cycle of a JSP.
Other
1. What is heap memory.
2. What are Xms and Xms.
3. How do we maintain transactions in Hibernate.
4. What are Spring IOC and Dependency Injection, how are they different than each other.
5. What are the benifits of using Spring IOC.
6. I have a class which has two variables name and roll no, this class is serialized, now I have two different conditions in one I do not want rollno to ge serialized, how can serialized interface help me in this.