Question
What is Generics in Java ? What are advantages of using Generics

Answers

This is one of the first interview questions asked on generics in any Java interview, mostly at beginners and intermediate level. Those who are coming from prior to Java 5 background knows that how inconvenient it was to store object in Collection and then cast it back to correct Type before using it. Generics prevents from those. it provides compile time type-safety and ensures that you only insert correct Type in collection and avoids ClassCastException in runtime.   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 How does ideological communication differ from other forms of communication?
  • Q Mention what is the characteristics of gantt chart basics?
  • Q Soapui is a free tool which can be used to test, what ?
  • Q Does sqlite support foreign keys?
  • Q What do you understand vertical micro code?
  • Q What are the New Job Postings from the Company or Organization, Plastics Export Promotion Council (PLEXCONCIL) ?
  • Q What are sp_configure Commands and SET Commands?
  • Q 26. What are the strategy groups you have used?
  • Q ‘Hybridization is an evolutionary catalyst’ – Substantiate.
  • Q What are the general implementation issues in the groupware systems?
  • Q Kim Peek, the famous 'savant', inspired Dustin Hoffman's character in which film?