Java #19 - Interfaces
Loading...
18,854
Loading...
There is no Interactive Transcript.
Uploader Comments (carlislemc)
see all
All Comments (13)
-
Very clear, well taught. Thanks!
-
Thank you very much. :)
-
Good video, pretty informative :D
-
thanks very much
more videos on java please?
Could you do one on casting objects?
I don't understand that fully
I know it takes loads of time to make these videos, but it's worth asking :P
-
Excellent video!!! now I can get program for Java Prog. II done! lol
-
Thanks that was very helpful
Loading...
for a card game, would you use an interface or an abstract class? :|
geraldnlang 7 months ago
@geraldnlang You use an abstract class when you want to create a bunch of common methods/attributes that will be inherited (reused). Interfaces are useful when you have a collection of classes that must implement the same methods, but there won't be reuse.
carlislemc 7 months ago
at 1:20, how did you pass car1 to the method travel, before you casted car1 to vehicle? If travel takes a vechicle parameter, shouldnt you have to cast car to vehicle first?
itsmancini 2 years ago
Since the class Car implements the interface Vehicle, you can pass it to travel (which requires a Vehicle) without having to do a typecast.
carlislemc 2 years ago
at 0:59, he meant to say the interface Vehicle, right?
shadowlizzard 2 years ago
Yes, I did mean "interface Vehicle". Sorry about that!
carlislemc 2 years ago