How can I do this ?


Joined
Dec 28, 2021
Messages
1
Reaction score
0
  1. Create a generic class with variable called same as your name. Create two objects of this class which will have different variable types. print their values.
 
Ad

Advertisements

Ad

Advertisements

Joined
Mar 3, 2021
Messages
170
Reaction score
19
Give this a quick read through, it's a pretty simple explanation of generic classes and types. Just add a print function to it. If there's something specific that doesn't make sense, let me know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top