Powered by Blogger.
Showing posts with label Differences. Show all posts
Showing posts with label Differences. Show all posts

What is the difference between Iterator and Listiterator ?

>> Saturday, August 20, 2011


There are two Differences are there :

1. We can use Iterator to traverse Set and List and also Map type of Objects. But List Iterator can be used to traverse for List type Objects, but not for Set type of Objects.

That is, we can get a Iterrator object by using Set and List, see here :

 By using Iterator we can retrieve the elements from Collection Object in forward direction only.

Methods in Iterator :

1. hashNext()
2. next()
3. remove()



Iterator ite = Set.iterator();
Iterator ite = List.iterator();

Read more..

What is the difference between doGet() and doPost() methods ?

>> Monday, March 21, 2011

The difference has given below......


 
doGet

doPost
In doGet Method the parameters are appended to the URL and sent along with header information
In doPost parameters are sent in separate line in the body
Maximum size of data that can be sent using doget is 240 bytes
There is no maximum size for data
Parameters are not encrypted
Parameters are encrypted
DoGet method generally is used to query or to get some information from the server
DoPost is slower compared to doGet since doPost does not write the content length
DoGet should be idempotent. i.e. doget should be able to be repeated safely many times
This method does not need to be idempotent. Operations requested through POST can have side effects for which the user can be held accountable for example updating stored data or buying items online.
DoGet should be safe without any side effects for which user is held responsible.
This method does not need to be either safe.





Read more..

Related Posts Plugin for WordPress, Blogger...
© javabynataraj.blogspot.com from 2009 - 2022. All rights reserved.