Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: What do you like/dislike about java?

  1. #1
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default What do you like/dislike about java?

    Just curious on what others think the plus/negative points of Java are compared to other programming languages.

    Pluses:

    * Garbage collecting is nice, sometimes. No need to mess with pointers/deconstructors
    * API (for the most part)
    * Usability (being able to go from platform to platform without changing code)
    * Javadoc (it's amazing how much help this is!)
    * The way class files can find/access each other's methods. I hated how you needed to declare function prototypes in C/C++, and had to put special quantifiers on those prototypes to get the compiler to recognize a function was in another file.
    * C/C++ code structure. Made the transition fairly easy, and I think the C/C++ code structure is one of the best, although has a rather high learning curve. Java's improvements to this syntax have made it a lot easier to understand. Personally, I like the strong-style coding (enforcing every last detail).
    * Web integration. I think Java applets and such far outdo flash/java script.
    * Java's special null keyword. Something I wished C/C++ had (I think it may be in the standard now, not completely sure)

    Negatives:

    * No memory management. This is a plus and a con
    * No multiple inheritance. It's possible to get around this with Java's interfaces, I don't know if I like them, though
    * No unsigned values (except char). Makes file data processing difficult
    * No operator overloading
    * No direct access to hardware stuff. Kind of handy at points. I know there are interfaces to get to these, but you can't create your own in Java
    * Can't use 1's and 0's for true/false. Haven't quite decided if this is a complete negative, but I would like to be able to do this
    * Enum's don't have a direct correlation to int's. I know it's an archaic thing, but sometimes it's very convenient math-wise when you have an enum that can be correlated to numbers without writing converter methods.
    * Everything is a class. Still not sure if this is a con.
    * Java's multi-threading. It's just too inconvenient and is way too cautious.
    * JVM overhead. Over the years this has gone down, but it's still not my cup of tea.
    Last edited by helloworld922; October 14th, 2009 at 12:25 AM.


  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: What do you like/dislike about java?

    I need to have a long think about this one I think, but from the top of my head.

    Pros
    - Ease of use, everything is just Ctrl+Space in Eclipse
    - The massive amount of support for it
    - Garbage Collection
    - Servlets/JSP technology
    - Plenty of thirdparty libraries out there with nice javadoc

    Cons
    - Garbage Collection
    - Memory management

    I'm sure there are more points I can raise on both of these and when I think of them I will add them.

    Somewhat off topic
    This will make your day

    Enums do actually have a numeric representation and you DO NOT need to write any conversion methods for this.

    public class EnumsTest1 {
     
        public enum Day {
            MONDAY,
            TUESDAY,
            WEDNESDAY,
            THURSDAY,
            FRIDAY,
            SATURDAY,
            SUNDAY;
        }
     
        public static void main(String[] args) {
            for (final Day day : Day.values()) {
                System.out.println(day.toString() + " = " + day.ordinal());
            }
        }
    }

    Maybe we need a little Java tips and tricks post regarding enums

    // Json
    Last edited by Json; October 14th, 2009 at 08:40 AM.

  3. #3
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: What do you like/dislike about java?

    :O can you decide what number to put for the ordinal?

    More pro's:

    * Jagged arrays
    * I decided that everything as an class/object is a plus

    Con's:

    * poor implementation of generics You can't create arrays of anything with a generic.
    * Not being able to pass by reference (primitives) is kind of annoying, too.

  4. #4
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: What do you like/dislike about java?

    No, the ordinal value is in the order they are added, hence the name ordinal I think

    // Json