Question
The difference between LinkedHashMap and PriorityQueue in Java?

Answers

PriorityQueue guarantees that lowest or highest priority element always remain at the head of the queue, but LinkedHashMap maintains the order on which elements are inserted. When you iterate over a PriorityQueue, iterator doesn't guarantee any order but iterator of LinkedHashMap does guarantee the order on which elements are inserted.   Your Comment




More Software,Java Questions..
What is the inputsplit in map reduce software?

Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

What is software configuration management?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

What is object cloning in Java?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?



Search
Can you Answer!!
  • Q Define automatic generation of purchase orders from purchase requisitions.
  • Q What is the role of need analysis in the design process. Give one need statement for each of the following: (i) Bicycle (ii) Washing machine (iii) Personal Computer (iv) Private car
  • Q If evil-doers invaded your country would you rush to the battlelines to defend the motherland or hide in a box?
  • Q What is the position of America in Human development index?
  • Q The Basic Savings Bank Deposit Account (BSBDA) issued by banks is offered to which of the following customers?
  • Q What will happen if the displacer has a hole in it while in line ?
  • Q What is the permission you need to take for fetching GPS locations, & reading contacts. Where will you have to write permissions in manifest file?
  • Q Edgar Lungu was sworn in as the president of which African country?
  • Q Isn’t nuclear power too risky to qualify for insurance, so the government has to cover liability insurance through the price-anderson act?
  • Q What is “extended star schema” and how did it emerge?
  • Q How many users can be added to an application role in SQL Server 2005?