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.
 
Joined
Mar 3, 2021
Messages
240
Reaction score
30
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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top