Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions Asked at interview

 
swathi reddy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)Can we pass colletions through callable statements? If yes how?
2)How do you store Pictures and text files in java?
3)After servlet generation of Jsp which life cycle methods will be generated?
4)Difference bet Resultset and Rowset?
5)Does Jsp supports caching? if yes how?
6)can we deploy an Enterprise application in Tomcat? If yes how?
7)Jsp is single threaded or multithreaded?
8)In base class if you are using one exception, is it possible to use super class of previous exception in child class?
9)BMP or CMP which is better?How?
10)Suppose you are performing operations with 2 databases and one database fials how will you rollback the transaction?
11)Where can i download Tomcat and java software?
[ July 03, 2006: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are your answers?
 
Santhosh Kumar
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Not sure if you can pass Collection to callable statement.

2. Not clear what you mean by "in Java". If you meant, how do you store picture and text files in the file system using java then; use java.io.FileOutputStream (or other streams) for pictures and java.io.FileWriter (or other writers) for text.

3. There are basically three lifecycle methods in Servlets. init(), service() and destroy().

5. Jsp as technology itself, does not support caching.

6. If your enterprise application consists of only Servlets and Jsps, yes you can. If it contains ejbs, mdbs etc, then you cannot. (http://tomcat.apache.org/faq/misc.html#ejb)

7. By default jsp is multi-threaded (meaning multiple threads would execute the jsp code simaltaneously). If you added directive <%@ page isThreadSafe="false" %>, then container ensures that only one thread execute a jsp's servlet object.

8. No.

9. If bmp would always be better than cmp or otherway, then sun would not have created underperforming technology at all. Depending on the scenario, both has pros and cons.

10. Use xa drivers which supports transactions across the dbms systems.

11. http://tomcat.apache.org/ and http://java.sun.com
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
11)Where can i download Tomcat and java software?

Who would ask this at an interview ? !!
I'd reply Google.com
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Who would ask this at an interview ? !!

I agree, these are strange questions to ask in an interview. Most of these can be answered easily within a few minutes given access to the API docs, the specifications and Google. The fact that an applicant remembers these is testimony of a level of basic experience, and of a memory for facts, but doesn't tell an interviewer much about his grasp of underlying concepts. The only one of these I might ask is #9, and pity the poor applicant whose answer favors one over the other instead of saying "it depends".
[ July 04, 2006: Message edited by: Ulf Dittmer ]
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)Can we pass colletions through callable statements? If yes how?


It should be possible to pass Arrays. I have tried this with Oracle database. Well may be a proprietary call.
[ July 04, 2006: Message edited by: Pradip Bhat ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic