Hi. I am learning JAVA programming language. I created a generic class:
Here is the code for it
With that, I can instantiate objects like this:Code:Public interface myclass <T,U> { ... }
What I do here please guide me:Code:mylcass <String, boolean> a = new myclass <String,boolean>();
Is there a way to make an optional type with generics? Any help would be highly appreciated.Code:myclass <String> a= new myclass <String>();



Reply With Quote
Copyright Techfuels
Bookmarks