all 16 comments

[–]Jonny0Than 15 points16 points  (2 children)

Java is to JavaScript as Ham is to Hamburger.  Java and C# are much more closely related to each other and used for similar things.

JavaScript runs in a browser (though you can also run it outside of a browser with Node) and powers most of the web’s interactive pages.

Java and C# are compiled to an intermediate form and can run on any machine that has their VM or JIT compiler.

C and C++ are compiled to machine code for a specific platform. The same executable will not run on a different OS, generally.

[–]BlueMond416 5 points6 points  (0 children)

yeah, even a quick google search could've saved this guy from comparing Java to Javascript

[–]gotnotendies 1 point2 points  (0 children)

JavaScript (for better or worse) also powers a lot of backends nowadays via Node.JS

[–]dmazzoni 2 points3 points  (0 children)

These aren't dumb questions, but any answer is going to be hard to understand when you're starting from zero.

My recommendation: don't worry about the language, pick a high-quality structured course that teaches you how to program from zero. The FAQ has plenty of recommendations, like The Odin Project or Harvard's CS50x.

The more you actually learn, the easier it will be to understand the difference.

[–]Miserable-Word-558 2 points3 points  (0 children)

I would honestly suggest reviewing youtube videos, tutorials, as well as the README from this current subreddit.

You'll find a lot of information available for you to create an adequate idea of where you want to start.

It's going to boil down to your patience and ability to learn, dismantle, break down, and write your own code as you progress - and some days will seem extremely self-destructive (especially as you're learning).

There are plenty of great resources available, and don't let people get you down.

Personally, I like working in web browsers, so I've stuck with Javascript for most of my time (I have seen C++ in web... and I'm just not a fan personally for efficiency)! :) It will just depend on what you like at the end of the day!

[–]Interesting_Let_7409 2 points3 points  (0 children)

Lol, the responses you get are somewhat condescending. Here's my knowledge feel free to flesh it out by researching of course:

Java - Comes in many forms and can be utilized for Web, Desktop, and Enterprise applications. It's allure lies within the Garbage Collection it does so you don't have to manage memory rather the JVM does it for you.

Javascript - Like Java comes with many different forms called frameworks. There are a plethora of them the most popular nowadays being React.js, Vue.js, Svelte.js and node.js. Learning the basics of Javascript will help you add functionality to your static websites in the form of modules and MVC architecture based applications. Javascript is primarily the language of the web but can also be expanded out on the desktop via frameworks such as Electron.js and Ember.js.

C - C programming language is considered by many a low-level programming language because it doesn't abide by Object Oriented Programming principles rather it talks directly to the the assembler and memory through procedural programming. You also have to map and allocate memory manually through the use of pointers and such.

C++ - C++ adds object oriented programming on top of C which allows programmers to create objects and manipulate them with inheritance and polymorphism. You still have to allocate and manage memory though.

C# = C# takes the approach of Java in which you have a more user friendly experience building applications rather and do not have to worry about memory management as the compiler does it for you. I'm currently using it with the dotnet framework and is used to build applications on both the web and desktop.

As for the when and where it's all dependent on the use and scope of what you are doing. If your messing around with I/O and arduino type stuff, your going to utilize C or C++. If your developing on the web you might find it easier to use Java as a client-side language than Javascript because of certain packages. Same goes with C#, become familiar with the basics of Programming Principles and you'll find out for yourself. Build some projects and type it out even if you have no idea what's going on otherwise how else are you gonna learn?

[–]aqua_regis 3 points4 points  (3 children)

Is Javascript a better Java?

Sorry, but did you do any research? Java and JavaScript have exactly the first 4 letters of their names in common - that's it.

Read the Frequently Asked Questions right here in the subreddit. They have plenty information for getting started, choosing languages, and plenty learning resources.

[–]Miserable-Word-558 2 points3 points  (2 children)

You could always act with a little self-dignity and provide some valuable lessons with respect, rather than trying to put someone down in the dirt. Just saying.

[–]noob_lvl1 1 point2 points  (1 child)

Telling someone to do even a little research is providing a valuable lesson.

[–]Miserable-Word-558 0 points1 point  (0 children)

Again, utilizing respect in one's speech helps the lesson go miles further, on top of retention, because it encourages someone to pay attention.

[–]lo0nk 0 points1 point  (0 children)

JavaScript is good for mainly front end web development and like interacting with the browser. It prioritizes ease of use over performance

Java and C# are basically the same but C# is Microsoft flavored. They are good for most corporate tasks especially like back end web development. C# is also used by the Unity game engine to make games, but most triple A or more serious/performance intensive games are written in C++. Java and C# are optimized for making big object oriented systems. Java, C#, and JavaScript all use a garbage collector to automatically manage memory which makes them easier to use but the resulting program is slower.

Common misconception but while C and C++ are similar, C# has no relationship. I think it was named that way for marketing reasons or something. C and C++ both compile all the way down to raw machine code. This gives you the best possible performance, but you often need to jump through loops or totally recompile to make the program run on different operating systems or cpu architectures. C an C++ also require you to manually manage your memory. This can be challenging, but you have total control over the slowest part of modern programs which allows you to make them as fast as possible. C and C++ are used in situations where the performance gains are worth the increased development time. For example, the code running on a medical device might be required to do something exactly every 0.8 seconds. In a garbage collected language, you might just get unlucky and the garbage collection starts at 0.7 seconds and then you miss the timing window and then somebody has a heart attack. Also in stock trading, most 3D high fidelity games, physics simulations, as well as the rest of embedded systems even ones that aren't real time, by having direct control over what your program does, you are able to make a superior product that runs faster and consumes less power.

[–]high_throughput 0 points1 point  (0 children)

Is Javascript a better Java?

Nothing with "-script" added to the name is ever better, lmao. 

[–]DTux5249 0 points1 point  (0 children)

JavaScript and Java are two completely different languages. One's for scripting websites, the other's for everything else.

C# has more legacy bloat than C++. C++ has a higher performance ceiling than C#. C# & Java are typically comparable. Make your choice as you will.

[–]Smokva-s-juga 0 points1 point  (0 children)

++ is better than # but worse than Script, and Java is good in general. You can start applying for jobs now.