Java - what is a a prototype? -


in lecture on java, computer science professor states java interfaces of class prototypes public methods, plus descriptions of behaviors.

enter image description here
(source https://www.youtube.com/watch?v=-c4i3gfye3w @8:47)

and @ 8:13 in video says go discussion section teaching assistants learn means prototype.

what "prototype" mean in java in above context?

i think use of word prototype in context unfortunate, languages javascript use called prototypical inheritance totally different being discussed in lecture. think word 'contract' more appropriate. java interface language feature allows author of class declare concrete implementations of class provide implementations of methods declared in interfaces implement.

it used allow java classes form several is-a relationships without resorting multiple inheritance (not allowed in java). have car class inherits vehicle class implements product interface, therefor car both vehicle , product.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -