Is there anything that java cannot do? But other's can?
I am talking about Java as a programming language.
This is just something to help me about what other programming languages I should also consider learning.
Edit: Ok, ive been doing java programming for many years and i sometimes have the feeling that I wouldn't need to learn another one. Java used to be somewhat limited in previous versions like there's no enums, autoboxing, generics, and many more. I am asking about "Java as a programming language" or maybe we can consider the syntax limitations of java that you guys wish it has. Something about the syntax/features that other languages offer but java doesn't.
Edit: Thank you for closing this. I wish though that i was given a little more time to make my question a little clearer. Seems like it was closed before my first edit was made.
Java has no 8-bit unsigned byte , Java can't convert an int to a boolean value, Java has no first class methods, Java has no pass by reference semantics, etc. None of those would prevent you from getting things done, but they are nonetheless things that Java can't do that other languages can.
C++ supports multiple inheritance of arbitrary classes. In Java a class can derive from only one class, but a class can implement multiple interfaces (in other words, it supports multiple inheritance of types, but only single inheritance of implementation). Java explicitly distinguishes between interfaces and classes.
You can do pretty much anything with Java. You can build application servers, desktop, and mobile applications, enterprise applications, and run unit tests. But of course, a programming language isn't everything you need to know to become a pro. Try to think of specific activity areas.
Packaging - In Java, you can create something like a Jar. Which can run on any machine where JVM is installed. and that JAR contains all the dependencies. In python you can't just ship something like a JAR, you will have to write a script to install dependencies in every machine you want to run your code on.
All general purpose programming languages in use are Turing complete, so in that very rigorous theoretical sense, they have the same power. There's NOTHING that is computable in, say, C#, but not computable in Java.
In a more practical point of view, though, yes, there are things that other languages can do that Java can't. It really depends on how you want to pick your nits. Java has no 8-bit unsigned byte
, Java can't convert an int
to a boolean
value, Java has no first class methods, Java has no pass by reference semantics, etc. None of those would prevent you from getting things done, but they are nonetheless things that Java can't do that other languages can.
As far as learning how to program goes, Java is not a bad choice. It's practical enough, but can be quite verbose. Rather subjectively, though, there are other more "fun" languages for learning that is just as if not more instructive than Java.
With regards to this remark:
I've been doing java programming for many years and I sometimes have the feeling that I wouldn't need to learn another one.
I'm sorry to say that this is a very self-limiting point of view. Learning another language can really expand your mind on what programming is all about. It can also be fun.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With