Skip to content
← Back to Community
What's the difference?
Profile icon
JordanDixon1

What's the difference between Java and Javascript? Are they made by different companies? I know that Javascript is made for the brower while Java is used for applications but I would like to know what the differences are. Syntax wise.

Voters
Profile icon
KemarionPeairs
Profile icon
JordanDixon1
Comments
hotnewtop
Profile icon
mwilki7

JavaScript is what's most commonly used to provide functionality to web pages (unless you're a diehard CSS expert).
Java CAN be used for websites (see .jsp)

Being programming languages they naturally have a lot in common (classes, variables, functions, etc...) but are typically used for completely different things.

Whoever named JavaScript has some serious explaining to do.

Profile icon
Geocube101

Despite their name, Java and JavaScript are 2 very different things
Java has way more keywords, different functionality and different purposes


Both of the following examples show the code required to print "Hello World" to the console
An Example of Java

class Main { public static void main(String args[]) { System.out.println("Hello World"); } }

An Example of Javascript

console.log('Hello World');