Added: 4 years ago
From: gorilla3d
Views: 71,386
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (33)

Sign In or Sign Up now to post a comment!
  • Finals are constants not variables, and you can have them in an interface. It's very common practice to have an interface called Constants, where you have your constants.

  • You can have variables, public static final

  • According to Chapter 9 of the Java Language Specification, it is proper style to declare an interface's methods without keywords public and abstract because they are redundant in interface method declarations. Similarly, constants should be declared without keywords public, static and final because they, too, are redundant.

  • You can have variables in an interface...must be public static.

  • Thanks alot for this

  • You most certainly can have variables in an interface, they are public and static by default, but they are not forbidden! You also do not have to use an abstract class either to implement an interface, you may also use a concrete class!

  • As far as I know you can have constants NOT variables. And you can omit public static final, as when you declare a variable in an interface, they immediately become public static final, another words, a constant.

  • This is not a good tutorial for someone who wants to learn core Java 1) 0:36 - Wrong! You can put variables in an interface. Interface variables are constants, so they're public, static, and final by default. 2) 0:45 - Interface methods are implicitly public and abstract, so no need to use those access modifiers: public void render() == void render().

  • @mrknight411 constants are NOT variables ! get your stuff right

  • Because I still don't know shit about Interface yet, and I would like to see what they would like for my skeleton

  • Hey If I send you my code can you make a interface for me? Please and Thank you.

  • whoa thanks, my lecture took over an hour to example it and made no scenes but here in like 5 mins I got it!

  • watch it yourself, and find problems of your T

  • There´s to much movement in this video for my taste. I get so annoyed with that the windows keeps moving around all the time, gives me a headache.

  • Bravo!

  • Gracias. Desearía que todos los videos de youtube tuvieran una imagen tan buena como este.

  • great explaination I got it instantly

  • great explanination man (compared to my teacher)

  • what does this teach us? you just shows us the diffrence between interfaces and classes.. You used 5 mins. to explain this.. I can do it in 30 seconds.. watch me.. you use the extends statement for classes and the implements statement for interfaces.. When implementing an interface, you have to implement all of it's abstract methods.. that's what you used 5 mins to explain.. -.-'

  • you can put static variables in interfaces, but not instance variables

  • Yes but don't forget they are Constants so they are static and Final.

  • Fascinating. Explain what the point of interfaces are.

  • Ignore this guys naming conventions - they are all wrong.

  • Who are you to say they are wrong? Just because he may not use the same naming conventions that you choose to use does not mean they are wrong. The important thing is to make sure you are consistent.

  • No they may not be to the design reccomendations but they are not WRONG, if they were the compiler would complain!

  • Explaining the benefits and advantages of interfaces and abstract classes would have been better.

  • I agree.

  • IBM Rational Developer

    RULES!!

  • public boid????

    juajua!!!

  • ya whatever mahboop was talking about ill assume what i find this as. unhealpful really. i might as well read a book on this part would have gotten me farther. faster

  • Interfaces is important in programming

    you just defind the methods without implementations

    -

    we have to define classes that implement the Interface, where you've to implement all the method which you've defined in the Interface

    --

    thanks Sir

  • hmph

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more