Hi,
I think there is mistake in the explanation:
"Since you are doing new ArrayList, you are creating an object of class ArrayList. You are assigning this object to variable "students", which is declared of class List. Reference type means the declared type of the variable."
You wrote List is a class but I think it is an interface.
Am I right?
Tamás
About Question enthuware.ocajp.i.v8.2.905 :
Moderator: admin
-
- Posts: 6
- Joined: Thu Sep 26, 2019 3:19 am
- Contact:
-
- Site Admin
- Posts: 10065
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.905 :
Yes, List is an interface but many times the term class is used to refer to any type including class, interface, or even enum to explain a point in general. It is imprecise but still commonly used.
If you like our products and services, please help us by posting your review here.
-
- Posts: 6
- Joined: Thu Sep 26, 2019 3:19 am
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.905 :
Thank you for your answer.
Tamás
Tamás
Who is online
Users browsing this forum: Bing [Bot] and 104 guests