Blog Archives

♥ Overloaded methods Vs Generic methods in Java with JD-GUI & javap to look under the covers

In an earlier post we looked at Understanding Overriding, Hiding, and Overloading in Java?. We also discussed how “method overriding” gives polymorphism. In this post, let’s see how a “generic method” can replace a number of overloaded methods. Then see under the hood as to what happens to the compiled

Read more ›

Posted in Generics
Tags:

♦ 7 rules to remember on Java Generics for better understanding

Here are 7 rules to remember regarding Java Generics to understand Generics and handle interview and coding questions on Core Java. Object <– Fruit <– (Orange, Mango, etc siblings) Rule 1: Java generics differ from C++ templates. Java generics (at least until JDK 8), generate only one compiled version of…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training, 2-Year-Java-JEE-Career-Training and 10-Day-Java-Interview-Refresher

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Generics, member-paid

♥ Java Generics in no time “? extends” & “? super” explained with a diagram

Generics in Java can be be a bit tricky to get your head around. Hope the explanation below enhances your understanding of generics. This complements 3 scenarios to get handle on Java generics. Plain old List, List <Object>, and List<?> The plain old List: is a heterogeneous mixture or a

Read more ›

Posted in Generics
Tags: ,

3 scenarios to get handle on Java generics

Q1. If java.lang.Object is the super type for java.lang.Number and, Number is the super type for java.lang.Integer, am I correct in saying that List<Object> is the super type for List<number> and, List<Number> is the super type for List<Integer>. A1. No. List<Object> is not the the super type of List<Number>. If that

Read more ›

Posted in Generics

♦ 12 Java Generics interview Q&A

Q1 What do you understand by the term type erasure with regards to generics? A1. The term type erasure is used in Java generics. In the interest of backward compatibility, robustness of generics has been sacrificed through type erasure. Type erasure takes place at compile-time. So, after compiling List and…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training, 2-Year-Java-JEE-Career-Training and 10-Day-Java-Interview-Refresher

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Generics, member-paid
Tags: , ,
1050+ subscribers. Reviews | Free Contents. 220K+ page views/month. Certified or not, you will be challenged with industrial strength problems to solve at work & job interviews.

600+ Interview Q&As – ♥ Free, ♦ FAQs

open all | close all

200+ FAQs for Quick Interview Prep

open all | close all

16 Technical Key Areas to standout

open all | close all

80+ Tutorials for self-taught projects

open all | close all

100+ pre-interview coding tests

open all | close all

How good are your …..?

open all | close all