Why must Java suck?

Deeko

Lifer
Jun 16, 2000
30,213
12
81
Doing an assignment for my OOP class that must be done in Java.

It would be so much easier in C++.

Java is awful.
 

Stuxnet

Diamond Member
Jun 16, 2005
8,392
1
0
Could you state - in specific terms - why you think Java sucks? Most people that work with it find it rather enjoyable.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Originally posted by: BFG10K
cross platform.
C++ too.

Except that you if you want to have a GUI you need to choose which platform you want. Windows API, GTK, QT, etc etc. If you want to develop for more then one it takes a LOT of work. Using Java you don't have to change any code to make it work with GTK, QT, Windows API, or any other platforms that have a JRE for them.
 

skace

Lifer
Jan 23, 2001
14,488
7
81
The java gui is the ugliest thing ever invented and I love how hitting enter never automatically sends the OK like you would expect.
 

Stuxnet

Diamond Member
Jun 16, 2005
8,392
1
0
You don't have to use the "java gui". If you're targeting a windows system, then you can use the Windows Look and Feel (and it's pretty much spot-on). And regarding it "not sending the ok", that's a problem with whoever coded it, not the gui itself. Like any other language, if the code behind it isn't tight and tweaked, it's going to feel unresponsive.
 

RedCOMET

Platinum Member
Jul 8, 2002
2,836
0
0
Originally posted by: Deeko
Doing an assignment for my OOP class that must be done in Java.

It would be so much easier in C++.

Java is awful.

I was finishing up an assignment for my Data Structures class, it really sucked.
 

skace

Lifer
Jan 23, 2001
14,488
7
81
Originally posted by: jbourne77
You don't have to use the "java gui". If you're targeting a windows system, then you can use the Windows Look and Feel (and it's pretty much spot-on). And regarding it "not sending the ok", that's a problem with whoever coded it, not the gui itself. Like any other language, if the code behind it isn't tight and tweaked, it's going to feel unresponsive.

I'm just going based on the dozens of java programs I've had to use.
 

Stuxnet

Diamond Member
Jun 16, 2005
8,392
1
0
Dozens?

Anyway, GUI coding in Java probably requires more responsible programming than .Net... but that doesn't mean it's bad, per se. With proper threading and instantiation, along with the Windows Look and Feel, you could easily be fooled.
 

Argo

Lifer
Apr 8, 2000
10,045
0
0
Originally posted by: BFG10K
cross platform.
C++ too.

Hmm, C++ isn't cross platform. Maybe ANSI C is, but if you're using anything outside of standard C++ libraries (which 99% of all programs do) you'll need to make code changes to make your program compile on the new platform.

On the other hand, I'll say that I've seen a lot more bad java programmers than C++. I think something about C++ forces you to follow programming principals more closely. Or maybe it's just tougher to program in C++, therefore weeding out all the bad ones.
 

znaps

Senior member
Jan 15, 2004
414
0
0
Originally posted by: skace
The java gui is the ugliest thing ever invented and I love how hitting enter never automatically sends the OK like you would expect.

LOL. I gotta laugh at this comment and the OP. You guys sound like babies who need everything done for you. How hard is it to add an ActionListener to the text field which is the same ActionListener as the OK button's ??

 

skace

Lifer
Jan 23, 2001
14,488
7
81
Originally posted by: znaps
Originally posted by: skace
The java gui is the ugliest thing ever invented and I love how hitting enter never automatically sends the OK like you would expect.

LOL. I gotta laugh at this comment and the OP. You guys sound like babies who need everything done for you. How hard is it to add an ActionListener to the text field which is the same ActionListener as the OK button's ??

LOL. Because I was talking as a user and not a programmer. I don't install a new tool and then recode it for the vendor.
 

znaps

Senior member
Jan 15, 2004
414
0
0
Ah, well then you do have a valid criticism of bad Java programmers. :) The language is not to blame though.
 

Deeko

Lifer
Jun 16, 2000
30,213
12
81
My assignment is a bunch of classes linked together through inheritance/dependancy. Its a pretty big project, and based on my initial design(in dia) the easiest method seemed to be multiple inheritance...oops....made the design not thinking that it was Java. I spent way too much extra time trying to make the design still work in Java....
 

Deeko

Lifer
Jun 16, 2000
30,213
12
81
Yes - but they are more work.

In the end the assignment isn't THAT difficult. The problem is that we don't know Java - this is a 3rd year course, the only Java we were ever taught was in 1/3 of 1 class last year. The professor knows this, he's a phd student who recently got his Masters, after having gone through both undergrad and grad school here, and he admits that he doesn't know Java either. Its great.
 

jman19

Lifer
Nov 3, 2000
11,225
664
126
Originally posted by: znaps
Interfaces should allow you to get around the multiple inheritance issue.

^^^ What znaps said.

You probably should have learned a thing or two about Java before coming up with your design, Deeko. Java isn't great, but C++ is pretty bad as well IMO.
 

statik213

Golden Member
Oct 31, 2004
1,654
0
0
Originally posted by: znaps
Interfaces should allow you to get around the multiple inheritance issue.

Exactly what interfaces are meant to do, look at the collections in the java.util classes -- they use a combination of interfaces and super classes to provide a rich collection of classes.
Java is not c++ and don't approach the problem in the same way as you would approach a c++ problem. You are going to have a tough time trying to implement multiple inheritence in java like you would in c++, there are ways to get around this and depending on how you approach it......
Besides, MI is an ugly mess and more often than not you can have a clearer implemenation using interfaces than with MI.
 

znaps

Senior member
Jan 15, 2004
414
0
0
Originally posted by: Deeko
Yes - but they are more work.

In the end the assignment isn't THAT difficult. The problem is that we don't know Java - this is a 3rd year course, the only Java we were ever taught was in 1/3 of 1 class last year. The professor knows this, he's a phd student who recently got his Masters, after having gone through both undergrad and grad school here, and he admits that he doesn't know Java either. Its great.


They may be slightly more work, and for a simle assignment you might not see the problem with multiple inheritance, but it can cause HUGE issues down the line in complex applications. I'm happier without it.

In fact I remember doing a C++ course and the instructor said it was perfectly acceptable to avoid using MI in C++ altogether because it's so difficult to get the design right.
 

flawlssdistortn

Senior member
Sep 21, 2004
680
0
0
Look, I know it's 1337 to rip on java and talk about how slow it is, but as a programmer, you will find that things like exceptions and inheritance are pretty useful. Java is also designed to be cross platform.
 

Deeko

Lifer
Jun 16, 2000
30,213
12
81
Oh don't give me that 1337 sh!t. I don't like Java because I use C++ in school and C# at work. Considering I've come to love C++, and C# does everything Java can do with that C++ touch of class...I have plenty of reasons to dislike it.