Page 2 of 2 FirstFirst 12
Results 21 to 22 of 22
  1. #21
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Washington, DC
    Rep Power


    Quote Originally Posted by Jeeni101 View Post
    Admittedly you have to use the concrete class type but you do only have 3 files to maintain, which is an increase of 40% in productivity. Which, in real terms, translates to a 3 day week!
    Using less files does not equal an increase in productivity. Using less lines of code to solve a problem is not inherently "better", just like using more lines of code isn't always "better".

    As has been pointed out, the usefulness of interfaces is really apparent in larger, more complicated systems. I would point out the various Renderer and Model classes and interfaces, for example for use with JTable.

    And I know your logic would be something like "well then just make a Renderer class and a Model class", but that wouldn't work for other cases where you have two implementations of an interface that don't share implementation details. An example of that would be the Collection interface and the ArrayList and TreeSet implementations.

    And, as has been said, if you're arguing that abstract classes with only abstract methods should be used in cases such as that, you're simply arguing for the semantics of an interface with a different name.

    But this argument really doesn't matter. It's like saying "Your favorite color can't be red because my favorite color is green". This is entirely subjective. Apparently interfaces don't fit into your brain- I'm not saying you're unintelligent, just that your brain fits things together in a way that doesn't translate into interfaces.

    Some people have brains that do more easily jive with interfaces. Presumably, the makers of Java were such people, which is why it's set up the way it is. I, and most others here, are the same way, so we prefer interfaces.

    If you aren't one of those people, you can use a different language. The makers of Java aren't going to read your post and smack themselves on the forehead, proclaiming, "My god! We've had it wrong this whole time!" and then change the language specification.
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  2. #22
    dlorde is offline Senior Member
    Join Date
    Jun 2008
    Rep Power


    Equally, if you can use Java to produce robust, flexible, extendable, maintainable applications using abstract classes instead of interfaces, then good luck to you - but I suspect we're talking about quite different project scales.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Interfaces
    By blug in forum New To Java
    Replies: 3
    Last Post: 03-08-2011, 05:01 AM
  2. What is the point of Interfaces?
    By minime12358 in forum New To Java
    Replies: 9
    Last Post: 09-02-2010, 02:24 PM
  3. Interfaces
    By jon80 in forum New To Java
    Replies: 2
    Last Post: 05-03-2008, 09:57 PM
  4. Interfaces
    By imran_khan in forum New To Java
    Replies: 5
    Last Post: 07-30-2007, 08:11 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts