After break of few weeks, I was called to be interviewer. The interviewee didn't disappoint, he provided several concepts, too many to handle (remember) at a time. Here are some of them. Enjoy !!!!
1. Controller is part of business layer.
2. JDK 1.5 (latest version of java :o) is re-branded version of JDK 1.4.
3. How to make a class singleton ?
Ans by interviewee: Create all constructors private.
"Hmm, seems he may know it"
That's it. class becomes singelton. "This is half hearted attempt to make class singleton, next we tried to help, propably this fellow knows"
class Tyre{
private Tyre(){
..
}
public static void main(String args[]){
new Tyre();
new Tyre();
}
Q: Will this class compile?
A: Yes
after some pause, don't ask why there was a pause.
Q: Ooooookay, how many objects of Tyre would be created ?
A: One. because it's singleton class.:o
4. Struts 1.2 is protocol dependent and struts 2 is protocol independent.That is difference between two versions.
5. To upload a file on FTP server we can create a servlet on server side and implement its doPost method. "FTP has post method :o may be in new re-branded version of FTP"
6. TCP / IP & OSI models are layered architecture. Since netorking is involved in servlets, struts. All Struts applications are layered.
7. Static variables are initialized at compile time.
8. All exceptions that are declared in throws clause are checked exception.
9. Check exceptions are caught at compile time in catch block. "He mean't some thing else, but what it sounded was a concept in itself"
And many more hilarious concepts which I no longer remember. It was indeed crash course for me, couldn't grasp any of these new concepts. Where is my ability to learn new concepts ? Have I lost it.