4. With a code example, show how you would iterate over a collection of objects in a jsp page AND in a java class.
R.N
Originally posted by Rohit Nath:
IF your collection is say
ArrayList myCollection
and you want to iterate it you use the Iterator.
Iterator itr = myCollection.iterator();
while(itr.hasNext()){
Object obj = itr.next(); //return single element/object from collection.
}
//here i have use Object reference instead your specific object type will come which is held in the collection. Ex. for me it may be MyCollectionObject.
- SCEA, SCJD, SCBCD, SCWCD, SCMAD, SCJP, ICAD (WebSphere), Lotus Principal CLP, Lotus CLP, Lotus CLS
R.N
SCJP 1.2, SCWCD 1.4
SCJP 1.2, SCWCD 1.4
3. Your application has some problems and is crashing a few times a day. What steps would you take to try and find the cause of the problem?
R.N
1. Your web application needs to access a table in database at regular intervals. Keeping in mind separation of concerns, minimizing load on the database and re-usability of your code, describe your solution to this?
2. Your application is mission critical and you need to make sure that it is running 24 hours a day. Describe a solution that ensures that the application notifies you if it crashes, its not running or if there are any serious errors?
3. Your application has some problems and is crashing a few times a day. What steps would you take to try and find the cause of the problem?
4. With a code example, show how you would iterate over a collection of objects in a jsp page AND in a java class.
5. Thinking about MVC on the client side, how would you apply an MVC architecture to CCS, JavaScript and your Web Page? Give a code example of attaching a JavaScript function to an onclick event of a button whilst obeying MVC.
this is supposed to be a surprise, but it smells like a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|