Skip to content
Java bro

Java full stack tutorial

  • Home
  • Java
    • Core java
    • Advance java
    • Java examples
  • J2ee
    • Jdbc
    • Servlets
    • Jsp
    • Jstl
  • Frame works
    • Struts 1.x
    • Struts 2.x
    • Hibernate
    • TypeScript
    • Angular
    • ReactJs
  • Spring
    • Spring core
    • Spring DAO
    • Spring ORM
    • Spring AOP
    • Spring MVC
    • Spring Boot
  • Micro services
    • Zuul
    • Cloud config server
    • Hystrix
    • Kafka
    • Redis cache
    • Sleuth
    • Zipkins
  • Interview Q&A
    • Java
    • Jdbc
    • Servlets
    • Jsp
    • Struts
    • Hibernate
    • Spring
    • Micro services
    • Angular
    • React Js
  • Others
    • Servers
    • IDEs
    • Java practice
    • Realtime exceptions
    • Sql Tutorial
    • Sql Queries
    • Domain knowledge
Java bro

Java full stack tutorial

  • Home
  • Java
    • Core java
    • Advance java
    • Java examples
  • J2ee
    • Jdbc
    • Servlets
    • Jsp
    • Jstl
  • Frame works
    • Struts 1.x
    • Struts 2.x
    • Hibernate
    • TypeScript
    • Angular
    • ReactJs
  • Spring
    • Spring core
    • Spring DAO
    • Spring ORM
    • Spring AOP
    • Spring MVC
    • Spring Boot
  • Micro services
    • Zuul
    • Cloud config server
    • Hystrix
    • Kafka
    • Redis cache
    • Sleuth
    • Zipkins
  • Interview Q&A
    • Java
    • Jdbc
    • Servlets
    • Jsp
    • Struts
    • Hibernate
    • Spring
    • Micro services
    • Angular
    • React Js
  • Others
    • Servers
    • IDEs
    • Java practice
    • Realtime exceptions
    • Sql Tutorial
    • Sql Queries
    • Domain knowledge
  • Home
  • Java
    • Core java
    • Advance java
    • Java examples
  • J2ee
    • Jdbc
    • Servlets
    • Jsp
    • Jstl
  • Frame works
    • Struts 1.x
    • Struts 2.x
    • Hibernate
    • TypeScript
    • Angular
    • ReactJs
  • Spring
    • Spring core
    • Spring DAO
    • Spring ORM
    • Spring AOP
    • Spring MVC
    • Spring Boot
  • Micro services
    • Zuul
    • Cloud config server
    • Hystrix
    • Kafka
    • Redis cache
    • Sleuth
    • Zipkins
  • Interview Q&A
    • Java
    • Jdbc
    • Servlets
    • Jsp
    • Struts
    • Hibernate
    • Spring
    • Micro services
    • Angular
    • React Js
  • Others
    • Servers
    • IDEs
    • Java practice
    • Realtime exceptions
    • Sql Tutorial
    • Sql Queries
    • Domain knowledge

Category: Generics tutorial

  • Home
  • Generics tutorial
  • Generics tutorial

Introduction to generics in java

Collection are not type safe. We can add any type of data to collection. Because of this , while retrieving the objects from collection , we will get proble at

  • vsreenu48
  • December 18, 2020December 22, 2020
  • Generics tutorial

Generics conlusions

Conclusion 1 : In java , Parent class or interface reference can hold child class object , this is called polymorphism . But coming to generics polymorphism will be applicable

  • vsreenu48
  • December 18, 2020December 22, 2020
  • Generics tutorial

Generic classes in java

Before jdk 1.5 ArrayList class is defined as follows. class ArrayList {add(Object o) ;Object get(int index);– –} ➩ See the above code . The argument of add() method is Object,

  • vsreenu48
  • December 18, 2020December 22, 2020
  • Generics tutorial

Create custom generic classes in java

In this tutorial we are going to learn, how to create custom generic class. See the below example. package sree; public class Student { String name; String id ; public

  • vsreenu48
  • December 18, 2020December 22, 2020
  • Generics tutorial

Bounded types in java

In this tutorial we are going to learn, What is bounded types and how to use it. See the below example. package sree; import java.util.Date; public class Sample<T> { T

  • vsreenu48
  • December 18, 2020December 22, 2020
  • Generics tutorial

Multi bounded types in java

In previous tutorial we used single class or interface as bounded type. But we can apply multiple bounded types at a time. See the below example. public class Sample<T extends

  • vsreenu48
  • December 18, 2020December 22, 2020
  • Generics tutorial

Generic methods in java

Before jdk 1.5 ArrayList class is defined as follows. class ArrayList {add(Object o) ;Object get(int index);– –} ➩ See the above code . The argument of add() method is Object,

  • vsreenu48
  • December 18, 2020December 22, 2020
  • Generics tutorial

Wild card characters in java generics

‘?’ is used as wild card character in java generics concept . Before going to learn use of the wild card character, let’s see the sample below. import java.util.ArrayList; import

  • vsreenu48
  • December 18, 2020December 22, 2020
  • Generics tutorial

Wild card characters with extend keyword

In previous tutorial, we have seen how to use wild card character . Wild card character allows to pass any type of list as parameter to the method . Then,

  • vsreenu48
  • December 18, 2020December 22, 2020
  • Generics tutorial

Wild card characters with super keyword

If we want to force the method to allow particuler type list or it’s super classes type list as parameter we have to use super keyword. See , below example.

  • vsreenu48
  • December 18, 2020December 22, 2020

Recent Posts

  • No router instance found. You should only use “next/router” inside the client side of your app
  • TypeError: First argument must be a string in React
  • Create a thread by implementing Runnable interface
  • Create a thread by extending Thread class
  • Life cycle of a thread
  • Introduction to multi threading in java
  • List Interface in java
  • Collection Interface in java

Popular posts

  • JBAS011232: Only one JAX-RS Application Class allowed 607 views
  • Type ‘Promise‘ is not assignable to type ‘string[]’ 300 views
  • Convert NCLOB vlaues to CLOB ins sql 300 views
  • Get today date in sql 200 views
  • Get last date of month in sql 200 views
  • Convert Long values to LOB values in sql 200 views
  • npm ERR! code ENOTFOUND 101 views
  • jspService is exceeding the 65535 bytes limit 101 views

Views

5971

Orchid Store Theme by Themebeez