After all, is Java a platform or a programming language?

6

I see several materials referring to Java as a technology (platform) and others as a programming language.

    
asked by anonymous 02.01.2018 / 21:57

2 answers

13

Both.

There is a Java programming language and a platform people call Java as well. It can be a bit confusing, but almost always the distinction is not important. Anyway I think it's best to use Java platform when talking about the platform.

Platform is not necessarily a technology, the platform is made up of various technologies.

The programming language is still a technology. Technology is knowledge, it is a tool that uses a certain knowledge. The Java language is not the only language used in the Java platform.

There is also a VM called Java Virtual Machine that is part of the platform.

    
02.01.2018 / 22:03
5

A good analogy is to compare with Microsoft .NET. When using the .NET Framework one can program in several languages: C #, VB.NET, C ++. All of these are compiled for CIL (Common Language Intermediate) which is the code that will effectively run on the virtual machine in .NET.

In Java (speaking of the platform), you can also program in several languages, some of them are: Java, Groovy, Scala, JPython, Closure, etc. All of these languages are compiled to Bytecode and will eventually run in the same Java Virtual Machine .

Obviously, compilers change for each language, but as all run in the same environment (after compiled), this facilitates (and much) the interoperability found in this type of solution.

In Groovy you can use libraries written in Java transparently. Similarly, libraries written in C # can be used in VB.NET.

    
05.01.2018 / 14:19