Blog Archives

05: ♥ 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:

01: ♦ 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 and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in Generics, member-paid

02: ♥♦ 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 5 Java generics interview Q&As with examples. Plain old List, List <Object>, and List<?> The plain old List: is a heterogeneous mixture or a mixed

Read more ›

Posted in FAQs Free, Generics, Understanding Core Java
Tags: ,

04: 5 Java generics Interview Q&As on wildcards with examples

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

03: ♦ 12 Java Generics interview Q&As

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 and 2-Year-Java-JEE-Career-Training Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in Generics, member-paid
Tags: , ,

800+ Interview Q&As – ♥ Free | ♦ FAQs | Hover/Slide

open all | close all

200+ Java Interview FAQs – Quick Prep

open all | close all

16 Java Key Areas to be a top-notch

open all | close all

80+ Java Tutorials – Step by step

open all | close all

100+ Java Coding Exercises

open all | close all

How good are your

open all | close all