Hey guys... can you tell me. What can you do only in java, which in not possible in any other language such as python, PHP, JavaScript.
For further actions, you may consider blocking this person and/or reporting abuse
Hey guys... can you tell me. What can you do only in java, which in not possible in any other language such as python, PHP, JavaScript.
For further actions, you may consider blocking this person and/or reporting abuse
LeonardoMarques -
Norbs' Notes -
Ayush Shrivastava -
ashish -
Top comments (10)
There is nothing you can do in a programming language and not in another, as soon as they are turing-complete, and as soon we are talking about the output of algorithms and not technical features (e.g. pointers) or libraries (e.g. a lib for cryptography may be available in a programming language but not in another).
So the answer to your question is "nothing", and we should talk about programming languages as tools in the inventory of every programmer. If your goal is to hammer a nail every tool can reach your goal: a stone, a piece of wood, a screwdriver. But a hammer is the best tool for this specific scope. Java may be the best choice for many projects but it's not somehow magic or special
Explain to your boss this is not javascript
Anything that can be computed in one Turing-complete language can be computed in any other Turing-complete language. So the answer to your question is: nothing. For an extreme example... If you can do it in Java, you can even do it in PostScript.
As others have said as long as your language is Turing complete you can do anything in terms of algorithms.
If we look at the Java compiler itself, there are some quirks which are Java specific. One thing I can think of are checked exception. I might not be knowledgable enough, but as far as I know, only Java is forcing you the explicitly handle certain exceptions.
Most of the "usual" modern languages support exceptions, but they do not really force the developer to handle them.
"But with Go you have to handle errors..." 😤
With Go you have errors as returned values, which are not exceptions. Go has its own way of forcing you to think about exceptional cases, but that is entirely different of how exceptions work.
I was going to say compile into java bytecode for the pun, but even this is not true anymore with Kotlin and all 😄
Kotlin is a JVM language, that runs on top of Java. It's not an independent language like PHP.
This was true at the beginning, but Kotlin Multiplatform now allows to "compile" into many more targets (javascript for one). I am not sure "JVM language" still holds now.
a bean
Technically that's just a class with a set of properties. Now, obviously you cannot have Java Beans in other languages, for obvious reasons 😅, but the implementation of the concept itself should be pretty easy.
Applets.