Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,956 members, 7,806,768 topics. Date: Tuesday, 23 April 2024 at 11:07 PM

The Difference Between Java And Javascript - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / The Difference Between Java And Javascript (2328 Views)

How To Build A Simple Search Engine Using Html Css And Javascript / After 10days Of Coding With Html, Css And Javascript Forum4africa Is Ready / Javathon Group : A Place Where Java And Python Developers Coexist (2) (3) (4)

(1) (Reply) (Go Down)

The Difference Between Java And Javascript by GreatZaza(m): 12:00am On Dec 03, 2016
Please i am a novice and i want to venture into the programming world. Those knowledgeable about programming should come to my Aid. i want to know the difference between JAVA AND JAVASCRIPT? Which should be recommended for a learner? And if one can learn it within two weeks? And what software should be used in coding any of them? Thanks
Re: The Difference Between Java And Javascript by abdulwahabO: 12:36am On Dec 03, 2016
you cant learn any programming language in two weeks, six months of regular study and lots of coding should give you a solid foundation.
if you cant find time to practice or you cant persist when things are tough, you wont learn how to program.

As for the difference between Java and JavaScript, you should learn how to google, its free.
Re: The Difference Between Java And Javascript by Nobody: 2:47am On Dec 03, 2016
The difference is the word, Script
Re: The Difference Between Java And Javascript by FrankLampard: 8:03am On Dec 03, 2016
abdulwahabO:
you cant learn any programming language in two weeks, six months of regular study and lots of coding should give you a solid foundation.
if you cant find time to practice or you cant persist when things are tough, you wont learn how to program.

As for the difference between Java and JavaScript, you should learn how to google, its free.

I actually learnt ASP.NET WebApi in 3 days with prior programming experience using PHP.

It all depends on the level you put yourself.

You can learn anything anyway you want.

2 Likes

Re: The Difference Between Java And Javascript by azibit: 8:40am On Dec 03, 2016
JavaScript runs on your browser mostly. However new technologies are making it run on the server and elsewhere. JavaScript is the language to learn if you want to be a front end person. Front end means designing things that run on the browser. The browser usually runs html, css and JavaScript.

Now java is used to run devices, and I mean a lot of devices. The OS of your Phone might be Android. Android programming is done mostly with Java. Java runs on back end server for a lot of organizations. Banking, health and a whole lot.

Learning Java before JavaScript is what I would advise if you want to be a full stack person. Java is not loosely typed like JavaScript and understanding Java gives a little idea in JavaScript.

However, the relationship between Java and JavaScript is like Car and Carpet.

About the time to learn each one of them. Well to have a basic idea and use them depends on you. But to really be proficient, you need time man. You need to really work hard. One day, two days. It depends on you, but programming is not what you learn and just stop. It continues.

I hope my long story does not bore you, read more books online to find better comparison between the two.

Thanks for Reading

5 Likes 1 Share

Re: The Difference Between Java And Javascript by iluvpomo(m): 3:46pm On Dec 03, 2016
azibit:
.... However, the relationship between Java and JavaScript is like Car and Carpet...
StackOverflow wink
Re: The Difference Between Java And Javascript by GreatZaza(m): 7:05am On Dec 04, 2016
Tnx i really dø appreciate everybody who has posted smtn. it means a lot
Re: The Difference Between Java And Javascript by worisj(m): 4:55pm On Dec 04, 2016
Both Java And Javascript are two different languages and have nothing in common except say javascript borrows some syntax from java which was done on purpose by netscape. Someone just thought it would be good for marketing strategies to have java in its name as at that time java was the most popular language.

Java was written by james gosling at sun microsystem which was later bought by oracle and was originally called oak while javascript was written by brendan eich at netscape and was originally called livescript. The language specification is called ECMAscript since javascript couldn't be used due to sun liscence on the name, so you refer to the versions of javascript as ECMAscript and to the language as javascript but both can be used synonymously. the current version of javascript is ECMAscript 6.

Javascript runs on a browser and is used for client(front End) side programming such as HTML5 and CSS3, although recent tech such as node js allow it to run on the server side.
Re: The Difference Between Java And Javascript by worisj(m): 5:18pm On Dec 04, 2016
javascript can be used for making apps with tech such as phonegap, and with tech such as AJAX(asynchronous Javascript And Xml) can be used to make web pages that hides interaction with the server so pages are served without reloading. Meanwhile java can do just about anything.

Java Is A Statistically Typed Language Which Means You Have To Declare All Variables And Objects While Java Script Is A Dynamically Typed One. Java Is A Full Fledge Object Oriented Language, Which Means Everything Is An Object
I"ll Advice You To Start With Python So You Know The Basics Of Programming And OOP Before Moving On To Java. But It All Depends On What You Want From The Language, If You're Interested In Client Side Web Programming Use Javascript, For Enterprise Application, Desktop Apps, Android Apps And Games Use Java.

To Get Started With Javascript Google Eloquent Javascript Or Speaking Javascript, To Get Started With Java Just Google How To In Java, Or Use A Java Online Resource From Green Tea Press.
Re: The Difference Between Java And Javascript by worisj(m): 5:29pm On Dec 04, 2016
To Use Java You Need To Download The JDK(java Development Kit) From Oracle Which Contains A JRE (java runtime environment) and an IDE(intgrated Development Environment) Such As Netbeans. For Javascript You Only Need A Text Editor Which Can Be Notepad Or Notepad++

And By The Way I Don't Think Any Programming Language Can Be Learnt Within A Space Of Two Weeks It Takes Constant Motivation And Dediction To Stick Around!!

I Would Wish You Luck But Its Not Luck That You Need! Get To Work
Re: The Difference Between Java And Javascript by BunchObute: 11:32pm On Dec 11, 2016
I particularly enjoyed your explanation, i would love to associate with you programming wise. Email me sir emmybunchgz@gmail.com
worisj:
javascript can be used for making apps with tech such as phonegap, and with tech such as AJAX(asynchronous Javascript And Xml) can be used to make web pages that hides interaction with the server so pages are served without reloading. Meanwhile java can do just about anything.

Java Is A Statistically Typed Language Which Means You Have To Declare All Variables And Objects While Java Script Is A Dynamically Typed One. Java Is A Full Fledge Object Oriented Language, Which Means Everything Is An Object
I"ll Advice You To Start With Python So You Know The Basics Of Programming And OOP Before Moving On To Java. But It All Depends On What You Want From The Language, If You're Interested In Client Side Web Programming Use Javascript, For Enterprise Application, Desktop Apps, Android Apps And Games Use Java.

To Get Started With Javascript Google Eloquent Javascript Or Speaking Javascript, To Get Started With Java Just Google How To In Java, Or Use A Java Online Resource From Green Tea Press.
Re: The Difference Between Java And Javascript by Nobody: 11:35pm On Dec 11, 2016
Which one is more difficult to learn and master? JAVA or JAVAScript?
Re: The Difference Between Java And Javascript by worisj(m): 12:07am On Dec 12, 2016
dhtml18:
Which one is more difficult to learn and master? JAVA or JAVAScript?
Hmmmmn Boss I Think Java is easier to learn and master than JAVAscript, what do you think?
Re: The Difference Between Java And Javascript by Nobody: 6:50am On Dec 12, 2016
worisj:
Hmmmmn Boss I Think Java is easier to learn and master than JAVAscript, what do you think?
Exactly that, when I started learning javaScript, i used to think javaScript was just a small part of JAVA, but not so at all - it seems far more complicated than JAVA.
Re: The Difference Between Java And Javascript by orimion(m): 9:48pm On Dec 12, 2016
dhtml18:
Which one is more difficult to learn and master? JAVA or JAVAScript?
JavaScript is super easier to learn but harder to master
Re: The Difference Between Java And Javascript by worisj(m): 9:53pm On Dec 12, 2016
orimion:
JavaScript is super easier to learn but harder to master
Have You Done Java Before?
Re: The Difference Between Java And Javascript by orimion(m): 10:24pm On Dec 12, 2016
worisj:
Have You Done Java Before?
I just printed hello world! is all i've ever done with it

1 Like 1 Share

Re: The Difference Between Java And Javascript by worisj(m): 10:34pm On Dec 12, 2016
orimion:
I just printed hello world! is all i've ever done with it
I Thought As Much, That Might Be Why You Say Javascript Is Easier Than Java. By The Way What Are Your Reasons?
Re: The Difference Between Java And Javascript by 2Awesome: 10:56pm On Dec 12, 2016
java is a complied language, javascript is an interpreted language.
Re: The Difference Between Java And Javascript by asalimpo(m): 3:35am On Dec 13, 2016
my take, the language that can "birth" the other, is the harder one to learn.
You can create a javascript engine in java, it's been done,but the other way round,
will be hard and almost too inefficient to be used. So the vote goes to JAVA.
Re: The Difference Between Java And Javascript by Nobody: 10:45am On Dec 13, 2016
^^^do you code in both languages? because these kinds of assertions are best made from experience - you cannot make such assertion based on the reasons you are giving.

Different programmers will tell you different things about the easier one to learn, let me try to give some points:
1. JAVA has a wider scope than javaScript and is more voluminous compared to javaScript
2. You dont need much tools to get started with javaScript compared to java - so it is faster to learn javaScript than java
3. JavaScript appears very simple, in fact too simple - till you discover that there are no rules, and no style of coding as such
4. JAVA is more organized than javaScript making it easy to learn

How to know that javaScript is really difficult to use and master is this - hardly will you find any javaScript programmer (not even experts like me) coding javaScript directly without using a library/framework like jQuery, Angular etc because there are just too many problems - browser compatibility issues etc

You can write a JAVA code and port it across virtually all platforms - but it is not so easy with javaScript. For you to write a direct javaScript application (client side) and make it work in all browsers (without using any framework/library) is a very very big deal (and not even advisable due to the complexities of the language).

So, all I am just trying to explain is that though javaScript is smaller in scope compared to JAVA - but it is a whole lot more complicated than JAVA.

- sayings of your favorite troll

1 Like 2 Shares

Re: The Difference Between Java And Javascript by abdulwahabO: 12:43pm On Dec 13, 2016
Java involves plenty of coding ceremony, but it's predictable, organised and comes with strict rules IMHO this makes it easier once the basics click, it takes time to really get the fundamentals, but when you do everything becomes much easier , using and understanding one of its three super IDEs make writing code much easier.
Re: The Difference Between Java And Javascript by worisj(m): 1:20pm On Dec 13, 2016
And To Add To The Above Why Java Is Easier Than Javascript
1) Prototypal Inheritance : While You Learn Classes, Methods And Constructor In Java In Javascript You Have To Learn Properties Which Are Keys That Maps To Value. Prototypal Inheritance Kinda Makes Javascript Complex Cause Even Literals Are Themselves Objects And Very Much Configurable

2)The Use Of This : Its A Relieve To Know That In Java The This Keyword Refers To Objects Whose Methods And Constructors Are Invoked. With Javascript Itz Not So, The This Refers To To Many Things Such As The Global Variable, The Function Been Invoked, And The Object Whose Method Is Invoked

3) Scoping : In Java Variables Are Said To Be In Scope When The{ } Is Encountered. Not The Same For Javascript, Variables Are In Scope When In Functions And To Make A Variable Visible To Only A Function An IIFE(immediately Invoked Function Expression) Has To Be Invoked That Has Its Own Special Syntax.
Re: The Difference Between Java And Javascript by worisj(m): 1:34pm On Dec 13, 2016
4) Arrays : Arrays In Javascript Are Not What Arrays In Python And Java Is. Arrays Are Maps From Indices To Value, Which Means Arrays Can Contain Holes And That Makes Iterating Through Array Hard, Cause You Have To Learn Diff Methods For Iterating And Know Which Ignores The Hole And Which Includes Them
5) Cross-platform : Its Easy To Write Java Code And Make It Run Anywhere, But That Can't Quite Be Said With Javascript Cause The Working Environmet Is Different From The Execution Environment.

The List Of Why Java Is Easier Than JavaScript Is Just Endless. Javascript Is A Simple Language But NeverTheless Its A Very Complex And Complicated One. On The Other Hand Java Is Just Over Verbose, A Simple Hello Word Program Might Take One Line In Python With View Words, But Would Take 4-5 Lines With Java But That Doesn't Make Java Hard
Re: The Difference Between Java And Javascript by Olumyco(m): 1:44pm On Dec 13, 2016
asalimpo:
my take, the language that can "birth" the other, is the harder one to learn.
You can create a javascript engine in java, it's been done,but the other way round,
will be hard and almost too inefficient to be used. So the vote goes to JAVA.


Bros this ur idea of "birth another language" to me does not equate to complexity or whatever.
Look at Smalltalk... its a dynamic language and powerful in fact one of the earliest JVM (IBM JVM) was built with it and yet when it comes to structure, OOP.... Java is more complex than Smalltalk. So U can see that it's not a yardstick.... that's to me anyway.

Just as you have said there are JavaScript engines written in Java so also the other way round though might be hard but some programmers don't care and that's why we can have jsJVM, DoppioJVM, Orto etc implemented in JavaScript.

To me:

Java is hard to learn at the beginning compare to JavaScript but at the long run JavaScript might become hard.
So is just like this: Java is hard at the beginning and if u can endure it will become easier at the long run. But for JavaScript it's easier at the beginning but at the long run you will start seeing some hard parts that U will need to sit down and understand very well.

I think this statement says it all: Java is hard to learn compare to JavaScript but easier to master compare to JavaScript.

Based on feature and scope I dont think one is larger than the other. People who have started using JavaScript ES6 will understand this.
Re: The Difference Between Java And Javascript by orimion(m): 3:00pm On Dec 13, 2016
worisj:

3) Scoping : In Java Variables Are Said To Be In Scope When The{ } Is Encountered. Not The Same For Javascript, Variables Are In Scope When In Functions And To Make A Variable Visible To Only A Function An IIFE(immediately Invoked Function Expression) Has To Be Invoked That Has Its Own Special Syntax.

{
let a = 2
console.log(a) // 2
}
console.log(a) // error

and the reasons you mentioned above are what I meant by mastering JS.

See Olumyco 's post above
Re: The Difference Between Java And Javascript by worisj(m): 3:51pm On Dec 13, 2016
orimion:


{
let a = 2
console.log(a) // 2
}
console.log(a) // error

and the reasons you mentioned above are what I meant by mastering JS.

See Olumyco 's post above
Ok But You're Saying Java Is Harder To Learn Than Javascript Which At The Long Run Becomes Hard To Master. And I'm Saying Javascript Is Harder To Learn At The Begining But Easy To Master At The Long Run. To Say You've Mastered Java Would Mean To Know Anonymous Classes, Inner Classes, Threading, Generics, Collection Classes, Annotations, Lambda Expression, Regexp Etc This Topics Are No Joke For A Beginner To Master, Compared To Javascript!!
Re: The Difference Between Java And Javascript by orimion(m): 6:44pm On Dec 13, 2016
worisj:
Ok But You're Saying Java Is Harder To Learn Than Javascript Which At The Long Run Becomes Hard To Master. And I'm Saying Javascript Is Harder To Learn At The Begining But Easy To Master At The Long Run. To Say You've Mastered Java Would Mean To Know Anonymous Classes, Inner Classes, Threading, Generics, Collection Classes, Annotations, Lambda Expression, Regexp Etc This Topics Are No Joke For A Beginner To Master, Compared To Javascript!!
I wouldn't know bro, I don't code Java. Maybe
Re: The Difference Between Java And Javascript by Nobody: 6:57pm On Dec 13, 2016
Experience is the best teacher, learn JAVA and learn javaScript, then you will know for yourself.
Re: The Difference Between Java And Javascript by rinomasaya: 7:22am On Apr 10, 2017
JavaScript is an object-oriented scripting language that allows you to create dynamic HTML pages, allowing you to process input data and maintain data, usually within the browser.

Java is a programming language, core set of libraries, and virtual machine platform that allows you to create compiled programs that run on nearly every platform, without distribution of source code in its raw form or recompilation. More about...Java and JavaScript

Rino
Re: The Difference Between Java And Javascript by Nobody: 10:03am On Apr 10, 2017
Your definition of javaScript is deprecated, and would have been considered valid in the ERA of dynosaurs!

(1) (Reply)

A Confused Programmer / NOUN PORTAL Nouonline.net, A Case Of Very Bad Design / Should You Study Computer Science To Learn How To Code?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 137
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.