dimanche 17 avril 2016

Java basics about generics and reflection

I am having a basic java question as I recently decided to dig into the language (I have been working exclusively with C++ for a long time and decided to expand my horizons a bit).

Assuming that I have a class called BankAccount and I try to create and object in my main, what is the difference between:

Class baCls = BankAccount.class; 

and

Class<BankAccount> baCls = BankAccount.class;

What does the baCls hold in each of the cases and what is the compiler output?





Aucun commentaire:

Enregistrer un commentaire