Page 1 of 1

About Question enthuware.ocajp.i.v8.2.905 :

Posted: Thu Sep 26, 2019 3:29 am
by TamasBuri
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

Re: About Question enthuware.ocajp.i.v8.2.905 :

Posted: Thu Sep 26, 2019 3:40 am
by admin
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.

Re: About Question enthuware.ocajp.i.v8.2.905 :

Posted: Thu Sep 26, 2019 4:54 am
by TamasBuri
Thank you for your answer. :)

Tamás