![]() |
|
[Java] Is Java an easy transition from Javascript? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] Is Java an easy transition from Javascript? (/showthread.php?tid=5082034) |
Is Java an easy transition from Javascript? - Feanor - Dec 4, 2015 I just wanted to know if they both follow the same sought of logic, I'm planning on learning JS soon (I code in python atm). I also want to learn a compiled language also when I'm comfortable with JS. I'm torn between C++ and Java but I'm leaning towards Java because of all the horror stories. * - Yuikoro - Dec 4, 2015 If you're already coming with programming knowledge then you should be fine with C++. It's just a bit more to keep up with is all. As for your actual question, JavaScript and Java are similar but Java is just the "whole package" if you want to think of it in that way. In Java you have to mind type variables in declaration whereas in JS you can just declare some variable that only holds some type of value. Ex Java: int myInteger = 3; ArrayList<String> stringArray = new ArrayList<String>(); Ex JS: var myInteger = 3; var stringArray = {"stuff", "stuff2"}; You also have to worry about global variables or whatever term you'd like to use. JavaScript doesn't have any of that from what I recall. Ex Java: public int myInt = 3; public void someMethod(){} private int someInt = 2; private void privateMethod(){} protected int otherInt = 1; protected void protectedMethod(){} etc.etc. Ex JS: var myInt = 3; function myFunction(){} You're better off learning Java in my opinion since it'll teach you the semantics to the syntaxes in a majority of object oriented langauges. Regardless it'll be much different from Python. * - Wesley Snipes - Dec 4, 2015 Java is an easier language to learn. Java and JavaScript aren't very similar other than the very basic concepts of programming * - CodeLeaks™ - Dec 5, 2015 (Dec 4, 2015 09:33 PM)Wesley Snipes Wrote: Java is an easier language to learn. Java and JavaScript aren't very similar other than the very basic concepts of programming To add to this, Javascript is a fairly function-oriented language whereas Java is more object-oriented. The syntax is pretty close too. Java is a good transition to C++ as well * - MrOrang - Dec 5, 2015 (Dec 5, 2015 01:04 AM)CodeLeaks™ Wrote: To add to this, Javascript is a fairly function-oriented language whereas Java is more object-oriented. Wanted to say this. Because the same word is in bith names doesn't mean they are "about" the same. However if you know the basics of programming you will learn Java faster. * - ItsUzi - Dec 5, 2015 OP are you targeting certain applications or do you just want any compiled language under your belt? * - Feanor - Dec 5, 2015 (Dec 5, 2015 08:32 AM)ItsUzi Wrote: OP are you targeting certain applications or do you just want any compiled language under your belt? I do just need a compiled language under my belt but the kind of things that I'll be coding are things that will be interesting to me such as rats, keyloggers, internet marketing tools. I don't want to start work on a new game engine or anything else over the top but I need to know an all round compiled language that will let me write nice code to put logic in to an existing game engine for small edits at a time. * - MorrisC - Dec 5, 2015 (Dec 5, 2015 12:15 PM)Feanor Wrote: I do just need a compiled language under my belt but the kind of things that I'll be coding are things that will be interesting to me such as rats, keyloggers, internet marketing tools. I don't want to start work on a new game engine or anything else over the top but I need to know an all round compiled language that will let me write nice code to put logic in to an existing game engine for small edits at a time. You're better off with C if you want to code rats, key loggers and other hidden hacking stuff. * - ItsUzi - Dec 5, 2015 (Dec 5, 2015 12:15 PM)Feanor Wrote: I do just need a compiled language under my belt but the kind of things that I'll be coding are things that will be interesting to me such as rats, keyloggers, internet marketing tools. I don't want to start work on a new game engine or anything else over the top but I need to know an all round compiled language that will let me write nice code to put logic in to an existing game engine for small edits at a time. Give C# a try. * - Kyriall - Dec 7, 2015 Java and Javascript are very different. You could learn for sure but the "Easyness" depends on your skill level and how fast you pick up new languages |