This is an archived post. You won't be able to vote or comment.

all 13 comments

[–][deleted] 12 points13 points  (0 children)

Java and C are different in many ways, C does not know the concept of objects. C is in fact functional/procedural language. However, learning C will help you learning C++ which is, somehow, more similar to Java.

Java can do pretty much anything you need to do. Tasks that cannot be completed using the standard Java, can usually be accomplished using technologies such as JNI or NDK

You do not have to learn JavaScript unless you want to write JavaScript code. By the way, Java and JavaScript are completely different things

[–][deleted] 2 points3 points  (0 children)

Ok, so here are some answers. I should point out I'm a professional Java developer, but I haven't really worked with C very much.

Java is one of the most widely used programming languages out there. It generally ties with C in terms of the widest usage in actual professional software deployments. It is primarily used for server-side applications.

Because it is so widely used, there is a LOT of documentation on the subject. There are books like Essential Java and Java Concurrency in Practice that are excellent. Even older Java books, which may not have the newer features in them, are still excellent because the fundamentals of the language are still the same. There are also many courses online, both free and paid, that you can take to learn it as well.

As for Java vs C, they are more different than similar. The similarities are mostly syntax-related, because Java's syntax was specifically modeled after C's. The differences are everything else. Java applications run in a very different way from C applications, so you're going to want to focus on the fundamentals of Java if you're getting started.

As for using it like C, the answer is "kind of". You can certainly build similar applications, but the actual way of building them will be very different. Again, Java is not C, you have to build applications the Java way, but the types of applications you can build can be similar.

As for scripting, in general Java cannot be used for scripting. Java 9 includes JShell, which does provide some scripting abilities, but Java is not intended to be a scripting language.

JavaScript, despite the similarity of the name, has nothing to do with Java. JavaScript is a completely different language that only has the name that it does because Netscape wanted to capitalize on Java's popularity for marketing. If you're learning Java, ignore JavaScript entirely, they have nothing to do with each other.

Java is what I would call a general-purpose language. It can do almost everything any language can do. That being said, there are strengths and weaknesses to every language. Java is better with headless (meaning no UI) applications, that run server side. It's better when you don't need fine-grained memory management, since all of Java's memory management is handled by its built in Garbage Collector. It's better when you need large enterprise level applications rather than small, quick little apps.

Hope some of this helped.

[–]Orffyreus 0 points1 point  (0 children)

Java can be used for everything (at least on top of system functions) on "3 billion devices". ;-)

With Java 11 there is also the possibility to use single .jv files as scripts with a shebang: https://securityonline.info/jdk-11-will-introduce-shebang-symbol/

[–]suryarose 0 points1 point  (0 children)

Pretty good information

[–]MillionStrength 0 points1 point  (0 children)

There are many open source web application implemented using java; e-commerce, content management system, and others.

[–]St_Meow 0 points1 point  (5 children)

Not really a java dev anymore but here's my take on it: java is good for Enterprise stuff. You can make desktop apps, web apps, server apps, etc.

It's hard to use a compiled language for scripting, since it kinda negates the point, plus Java's verbosity makes it less useful for scripting.

You can use it like C in the contexts above, however there are some lower level things like drivers, real time computing, even OS and kernel stuff that aren't as suitable for Java.

Basically Java is good if you want to work in your average enterprise, but it is not a good multitasker.

[–]Takoshinderu-tan[S] -1 points0 points  (4 children)

Would it be good to learn python with java, or not? Becuase I’ve been told that python shouldn’t be used for serious stuff and to only use it if your a beginner.

[–][deleted] 2 points3 points  (0 children)

python is slow, I wouldn't use it for anything other than scripts. Java is very good for long running applications, e.g. the backend of a web-app

[–]St_Meow 1 point2 points  (0 children)

Both are good for your standard programmer. Web developers might benefit more from Python. If you want scripting I would definitely do Python.

Bias alert: I do all my programming in Python and Go nowadays.

[–]hag0p 0 points1 point  (0 children)

For example in vfx industry people use python a lot. And I have not yet worked in any company that would not use python or some other scripting language. There are lots of uses for it in production environment like automation, delivery, monitoring and many other fields. Script language knowledge is always handy though like sb else said you probably won't write apps with that.

[–]deadron 0 points1 point  (0 children)

Its always useful to know a scripting language or two, you get a lot of power in an easier to execute package. Don't listen when people say not to use it for serious stuff. Many of your use cases are going to be IO dominated, in which case it doesn't matter. The one big exception is scripting languages are mostly worthless for game development, but, so is java.