• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Core Java/JSP/SERVLETS/DESIGN PATTERNS Queries

 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below are few Core Java/JSP/SERVLETS/DESIGN PATTERNS Queries.
Please let me know the answers.

1>what is the difference between Value Object(VO) and Java bean?
2>what is the difference between arraylist and linkedlist?
3>what is a Business delegate design pattern?
4>how do we implement singleton design pattern in a Servlet?
5>{Code for a servlet below starts}

init(){
int i=10;
}

service(){
out.println(i);
}
//what is the ouput in this case??
{Code for a servlet ends}
6>what are the differences between HashMap and HashTable?
7>How do you read a Large file(Example ..size > 2 MB) from database?
8> how do to read a CLOB,BLOB Objects from database?
9> what is the difference between BufferedInputStream and FileReader ?
10> how do to write my own Exception class.?
11> By default,how do to get the objects in a collection sorted ?

Help provided will be highly appreciated.

[Edit: removed needless bolding]
[ September 21, 2008: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaRanch is not the place to come and get your homework done for you. What are your answers to the questions? We'll help you clarify any confusion you might have, but no one here will do your work for you.
 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear Bibeault,
I do understand that no one will do my home work but for the above queries i'm unable to find the answers and i do not know how to find out the answers for the same.I did do a google search but could not get any help.hence im posting on the forum.

If you think im justifying in a right way.Please accept my request and let me know the answers.
 
tapeshwar sharma
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I do understand that no one will do my home work but for the above queries i'm unable to find the answers

My 2... no...3 cents:
1)There is no need for a Bear Bibeault for such questions.
2) Actually, there is no need for anyone for such questions.Let me introduce you to my Genie.Have fun.
3)In case you just want to chat with Bear, there is a meaningless drivel forum in Java Ranch where you can initiate a few threads.With good luck, you might be able to lure him to at least one.
 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi prashant bhardwaj and other guys,
Please help me out with answers.Requesting you once again

--
Deepak Lal
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1>what is the difference between Value Object(VO) and Java bean?

Value object is a pattern, a bean is a specification

2>what is the difference between arraylist and linkedlist?

Please check the Java API

3>what is a Business delegate design pattern?

Sound like one for the Pzattern's forum

4>how do we implement singleton design pattern in a Servlet?

More input. Why would you?

5>{Code for a servlet below starts}

init(){
int i=10;
}

service(){
out.println(i);
}
//what is the ouput in this case??
{Code for a servlet ends}

You should try this and see.

6>what are the differences between HashMap and HashTable?

Again you should get used to using the API

7>How do you read a Large file(Example ..size > 2 MB) from database?

Please ask this in the JDBC forum.

8> how do to read a CLOB,BLOB Objects from database?

As above.

9> what is the difference between BufferedInputStream and FileReader ?

PLease ask this in the Streams forum. The API would help, though.

10> how do to write my own Exception class.?

Please ask in the beginner forum.

11> By default,how do to get the objects in a collection sorted ?

Se the API for the java.util.Collections class
 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shreiff,


4>how do we implement singleton design pattern in a Servlet?
More input. Why would you?

Asked in the interview..do you know the answer for the same?

 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the pointh they wanted you to bring up was there is a single instance of a Servlet created for each servlet-mapping. In a basic sense this means that for any Servlet class there is usually only a single instance created, which makes it act as a Singleton.
 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David O Mearra,
Hence you mean to say there is no need to implement Singleton design pattern in a Servlet,Because by default,it acts as a singleton(single instance of servlet is created for each servlet mapping).

Please let me know if my interpretation is correct ?

--
Deepak Lal
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds OK.
 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Shreiff(David O Merra) and other's for supporting me with valid answers for above queries.

Thank you once again....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic