I have class like Test.I am passing class as argument.
What is the difference between the below code :
Map maps = new HashMap();
maps.put("ARG_ID",Test.class);
and
Map maps = new HashMap();
maps.put("ARG_ID",this);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Test.classis theClassobject representingTest, it is used for reflection and generics.this, when referenced in a class, is the current instance of the class you are working on.