• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pros and cons of java

 
Dirk Trompetter
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does someone know a page about pros and cons of java?
just a summary.
thanks
[This message has been edited by Dirk Trompetter (edited September 18, 2001).]
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pros:
It runs on any platform including my thermostat and cell phone.
It is object oriented - which needs a whole separate topic to define why THAT is the best way to go (extensibility and reusability etc.)
It is free.
It is easier to code than C++.
It is less prone to bugs that C++.
Cons:
It has a (very slightly) lower performance than C++.
Microsoft doesn't like it. (Or is that a Pro?)
 
Dirk Trompetter
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can find many pros! But where are the cons? There's more to it than that. Come on
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I came to Java from a MS/VB background, and the hardest thing for me to get used to was all the casting I needed to do.

For example, in Visual Basic, typing (not the kind on a keyboard) is much more loose. You can pull a value out of a collection-type object, and assign it to a typed variable, and the runtime will attempt the cast for you.
Another example is recordset/ResultSet. In VB it's rs.get("columnName") and you don't need a getter for every single possible return type. (ie: getString, getInt, etc...)

In Java, you need to do more manual casting, which can mean a lot more typing (the kind on the keyboard), and hey.. sometimes there are multiply-cascaded calls and a single line of code can become quite gruelling with all the casts in there, and I always end up leaving off a ( or ) somewhere.

But I'm pretty sure there's no 'die-hard' reason this makes Java 'bad'.

The other issue that comes to mind when I think of Java is: SLOOOOW. Sorry Cindy, but there are times when Java is not 'slightly' slower. You just cannot beat using C++ (or even VB) for speed when we're talking about GUI'd apps. AWT is not too bad, but looks like a Win16 app. Swing looks pretty good (in fact I like the Metal look, and not the 'windows' look), but it is still a little buggy and is much slower than a comparable VB/C++ app.

Using Java for cgi or parsing/munging of files... VERY fast, as good as anything I think. But it still chugs on the GUI side.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another Con is that if you need to do something lowlevel and operating system specific - you pretty much need to do it in C++ or whatever and use JNI to integrate it with your java app.
 
Tom Ben
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,
I understand your side of the VB GUI and yes Java maybe slower but when was the last time you created a GUI enviroment on anything other than Windows with VB. For that fact when have you been able to just ftp your compiled VB code over to any other system and run it. Not downing VB so do not take this as a crack on VB. I do agree that Java does run slower and since I have been using a little C# I have found that it runs faster than anything I have used.
------------------
Sun Certified Programmer on the Java 2 Platform
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic