Martin Wildam said:
Hi folks,
as I am about to switch to java, can somebody tell me the biggest
disadvantages of java so that I know where I will get the problems and where
the bottlenecks are?
I can only point out the things that are the most difficult for most of my
students:
1. Understanding the concept of passing by value. (And stop saying "I pass
an object" until you really know what is happening.)
2. Understanding that only variables are passed from method to method.
3. Understanding reference variables and not getting confusion between
reference variables and objects.
4. Understanding casting, particularly of reference variables. This is
probably the most difficult concept.
5. Learning the way classes are located for syntax checking at compile time
and loading at runtime.
6. Understanding how "callbacks" are used in Java. This involves listeners
being "well known names" that a caller identifies as callback code.
7. Forgetting about how the language you are currently using does things;
getting rid of the assumptions you are used to making.
8. Learning to read the documentation.
9. Graphics are difficult until you understand points 4, 6, and 8.
10. Understanding why you need an up-to-date runtime. Getting it installed,
i.e. talking people into installing it when they don't have one. The one
Microsoft used to provide doesn't count.
11. Understanding access modifier rules.
12. Understanding threading and synchronization.
The simple points:
1. There are only nine kinds of variables. They all have exactly defined
properties.
2. There are so many classes already implemented that you don't have to
reinvent many wheels. It's like a gigantic Tinkertoy set with which you can
build just about everything.
3. You CAN just about run anywhere (that has a runtime installed).
It looks like a lot of negatives, but it is such a powerful system once
these details are understood and one learns how to manipulate it that I
think it is worth it.
Now if only Sun doesn't drop the ball while distracted with other things --
like staying solvent.