Java vs JavaScript

Java
Java

25.4K
15.1K
+ 1
3.2K
JavaScript
JavaScript

46.9K
33.8K
+ 1
7.3K
Add tool

Java vs JavaScript: What are the differences?

What is Java? A concurrent, class-based, object-oriented, language specifically designed to have as few implementation dependencies as possible. Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!.

What is JavaScript? Lightweight, interpreted, object-oriented language with first-class functions. JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.

Java and JavaScript can be primarily classified as "Languages" tools.

"Great libraries", "Widely used" and "Excellent tooling" are the key factors why developers consider Java; whereas "Can be used on frontend/backend", "It's everywhere" and "Lots of great frameworks" are the primary reasons why JavaScript is favored.

According to the StackShare community, JavaScript has a broader approval, being mentioned in 5080 company stacks & 6471 developers stacks; compared to Java, which is listed in 2399 company stacks and 2723 developer stacks.

- No public GitHub repository available -
- No public GitHub repository available -

What is Java?

Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!

What is JavaScript?

JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.

Want advice about which of these to choose?Ask the StackShare community!

Why do developers choose Java?
Why do developers choose JavaScript?

Sign up to add, upvote and see more prosMake informed product decisions

What are the cons of using Java?
What are the cons of using JavaScript?

Sign up to add, upvote and see more consMake informed product decisions

What companies use Java?
What companies use JavaScript?

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Java?
What tools integrate with JavaScript?

Sign up to get full access to all the tool integrationsMake informed product decisions

What are some alternatives to Java and JavaScript?
C
Abstract
Abstract builds upon and extends the stable technology of Git to host and manage your work.
Go
Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
Scala
Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do. To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them.
See all alternatives
Decisions about Java and JavaScript
No stack decisions found
Interest over time
Reviews of Java and JavaScript
Review ofJavaScriptJavaScript

excellent!!

How developers use Java and JavaScript
Avatar of Andrew Faulkner
Andrew Faulkner uses JavaScriptJavaScript

Almost the entire app was written in Javascript, with JSON-based configuration and data storage. The following components were written and/or configured with Javascript:

  • Most server-side scripts, all unit tests, all build tools, etc. were driven by NodeJS.
  • ExpressJS served as the 'backend' server framework.
  • MongoDB (which stores essential JSON) was the main database.
  • MongooseJS was used as the main ORM for communicating with the database, with KnexJS used for certain edge cases.
  • MochaJS, ChaiJS, and ExpectJS were used for unit testing.
  • Frontend builds were done with Gulp and Webpack.
  • Package management was done primarily with npm - with a few exceptions that required the use of Bower (also configured with JSON).
  • "Templating" was done with Javascript dialect JSX.
  • The frontend was build primarily with ReactJS (as the View) and Redux (as the Controller / Store / frontend model).
  • Configuration was done with json files.

The only notable exceptions were the use of SCSS (augmented by Compass) for styling, Bash for a few basic 'system chores' and CLI utilities required for development of the app (most notably git and heroku's CLI interface), and a bit of custom SQL for locations where the ORM extractions leaked (the app is DB-agnostic, but a bit of SQL was required to fill gaps in the ORMs when interfacing with Postgres).

Avatar of OutSystems
OutSystems uses JavaScriptJavaScript

Read more on how to extend the OutSystems UI with Javascript here.

OutSystems provides a very simple to use AJAX mechanism. However, developers can also use JavaScript extensively to customize how users interact with their applications, to create client side custom validations and dynamic behaviors, or even to create custom, very specific, AJAX interactions. For example, each application can have an application-wide defined JavaScript file or set of files included in resources. Page-specific JavaScript can also be defined.

Avatar of Gorka Llona
Gorka Llona uses JavaScriptJavaScript

This GNU/GPL licensed Javascript library allows you to draw complex organizational charts that can't be drawn using Google's tool or equivalents. Orgchart structures are specified with JSON and can be generated on-the-fly by server-side scripts and databases. Events can be attached to clicks over the boxes. Multiple options can be defined; look at the repo for examples. This 1300-code-lines software component with contributors from 8 countries (and others for which I have to integrate their works) appears in the first page of Google Search results when searching for "Javascript Organizational Chart Library".

Avatar of Brian Fults
Brian Fults uses JavaJava

Pretty much everything - Java is reasonably fast, reasonably safe, and reasonably expressive. I wouldn't call it the best at any of those things. The real advantage to me is that the virtual machine is ubiquitous and many people can understand it. Since I have the most experience in this language, it's my tool of choice for most projects.

I've also been learning JavaFx so that I can build user interfaces without the web. I've started several single-page-application projects that worked, but felt like workarounds or hacks and would be better-served as self-contained applications.

Avatar of Cloudcraft
Cloudcraft uses JavaScriptJavaScript

JavaScript gets a bad rep, quite undeservedly so in my opinion. Today, JS is closer to functional languages than to the traditional-OO languages, and when used as such provides a great development experience. The pace of development is just picking up with transpilers like Babel making future advanced language features available to the masses today. At Cloudcraft.co, we write 100% of both the front-end (with React) and the backend (with Node.js) in Javascript, using the latest ES6 and even some ES7 features. This is not your grandfather's Javascript!

Avatar of MOKA Analytics
MOKA Analytics uses JavaScriptJavaScript

The application front-end is written in JavaScript (ES6). We originally selected it over TypeScript because many library typings at the time were still flaky and the transpilation time was slow.

We are now re-considering TypeScript because 1) the tooling has improved significantly, and 2) and the root cause of the majority of our front-end bugs are related to typing (despite having PropTypes).

Avatar of denkbar.io
denkbar.io uses JavaJava

Do I really need to explain? Well to me, the most appealing factor in Java besides the unbelievable community and vast array of available libraries, is just the amount of effort that has been put in the modern JVM. Decades of optimization and improvements have lead to a terrific piece of technology. I admire the people contributed to that.

Avatar of Scrayos UG (haftungsbeschränkt)
Scrayos UG (haftungsbeschränkt) uses JavaJava

Shouldn't surprise anyone, as minecraft is also java-based. Java is used for much more than just the plugins though. JCVortex (our API) is also served with vert.x (Java) and many of our team-internal tools also originated from java or are still java-applications.

Avatar of Web Dreams
Web Dreams uses JavaJava

The most popular language in the world, definitely every programmer would use the Java language at some point. Frankly, I only use java when it’s a must. I find the language to be a little bit tedious when working with it.

Avatar of brenoinojosa
brenoinojosa uses JavaJava

bytelore.com makes extensive use of Java in its applications. We use Java due to its performance, community and the number of other projects built in the language. We have many projects and libraries built in Java.

How much does Java cost?
How much does JavaScript cost?
Pricing unavailable
Pricing unavailable