Question
Difference between List < Object > and raw type List in Java

Answers

Main difference between raw type and parametrized type List< Object > is that, compiler will not check type-safety of raw type at compile time but it will do that for parametrized type and by using Object as Type it inform compiler that it can hold any Type of Object e.g. String or Integer. This Java Generics interview question is based on correct understanding of raw type in Generics. Any way second difference between them is that you can pass any parametrized type to raw type List but you can not pass List to any method which accept List< Object > it will result in compilation error. Read How Generics works in Java for more details.   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 I'm trying to send email from sap to microsoft outlook. When i attempted to configure sapconnect it failed. On unix level i try to run command "mlunxsnd" and "mlosmadm" but found that it doesn't exist in unix. How should i solve this problem?
  • Q What are halophiles ? Cite two examples.
  • Q Who said in 1951 - "I married beneath me - All women do"
  • Q Total balls are z, the number of red balls is n and the remaining are blak balls,then the % of black balls equal to ?
  • Q How does the board's role in oversight of risks factor in?
  • Q _________ states in India has the highest rural population?
  • Q What grammatical sign takes its name from the Greek words 'under' and 'one'?
  • Q Three adults – Roberto, Sarah and Vicky – will be traveling in a van with five children – Freddy, Hillary, Jonathan, Lupe, and Marta. The van has a driver’s seat and one passenger seat in the front, and two benches behind the front seats, one beach behind the other. Each bench has room for exactly three people. Everyone must sit in a seat or on a bench, and seating is subject to the following restrictions: An adult must sit on each bench. Either Roberto or Sarah must sit in the driver’s seat. Jonathan must sit immediately beside Marta. If Sarah sits on a bench that is behind where Jonathan is sitting, which of the following must be true ? a. Hillary sits in a seat or on a bench that is in front of where Marta is sitting b. Lupe sits in a seat or on a bench that is in front of where Freddy is sitting c. Freddy sits on the same bench as Hillary d. Lupe sits on the same bench as Sarah e. Marta sits on the same bench as Vicky
  • Q The duty to protect and improve the environment is enshrined under the Article
  • Q What was the first food consumed on the moon in Apollo 11
  • Q Who is the founder of ABO Blood Group?