ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What exactly is the purpose of JAVA? What is it supposed to do above and beyond other languages? What type of programming does it excel at and what type of programming does it struggle at?
And this might be a stupid question, but is JAVA an interpreted or a compiled language?
I am really juggling whether to take the course that teaches JAVA or not and am trying to gauge what benefit if any (other than the benefit of just learning another language and programming style) it would be for me to learn JAVA.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by JMJ_coder
And this might be a stupid question, but is JAVA an interpreted or a compiled language?
Not a stupid question but no simple answer. The distinction between interpreted and compiled languages is fuzzy when applied to Java.
Java is compiled to binary code which is initially interpreted by the Java virtual machine. When the program is run, the JVM selects parts of the java program which are the most used and "compiles" them again, this times to the target platform native code (eg: x86, SPARC, PPC, ...)
From a developers point of view, I feel that the greatest advantages of learning Java would be that your code will be compatible without, or with very little, change on a whole range of platforms. Your code will run on the Java Virtual Machine (JVM) on Linux, Solaris, Windows etc, and the compiled Java byte code will also run without recompiling. Java is also available on many platforms. With the right runtime environment you can write Java programs to run on your mobile phone, on your multimedia desktop or in your web browser.
In my experience Java is rarely used for systems level programming, but instead is more commonly applied to application programming, with several toolkits available for writing GUI applications.
Java 'can' also encourage the development of sound OO programming and design techniques and is often used as a tool for doing this.
If you do this course, you will most likely spend many hours doing assignments sifting through the extremely large API documentation. I've heard lecturers say on multiple occasions that no single person can know all, or even most, of the huge API.
But if you know c and/or any OO language, the Java language will be quite easy to pickup.
Person you = new LQUser("JMJ_coder");
Person me = new LQUser("LazyFoot");
Course javaCourse = new Course("Intro to OO and Java", "comp", 1150);
if (you.takingCourse(javaCourse)){
you.addWish(new Wish("Good luck with it!", me));
}
What exactly is the purpose of JAVA? What is it supposed to do above and beyond other languages? What type of programming does it excel at and what type of programming does it struggle at?
Java is a development of the 'c' based languages which is intended to be a High level application language where the produced code is platform independent. Java is a good language for gui based applications, middleware and any project where you are targeting different platforms. Java is a poor choice for system level software (Operating systems, device drivers, back end servers). Java is ok for games software. Java excels at network programming and large business projects because of the large 'framework' available.
Quote:
And this might be a stupid question, but is JAVA an interpreted or a compiled language?
Java is compiled into Java Byte Code which is either interpreted or compiled down to machine level at runtime (Just in time or JIT compiler) in exactly the same way .net languages used by microsoft compile down to 'CIL' code. Java can be compiled directly to machine code on linux using the GCJ compiler. There are several Java implementations available but most people go with SUN's version.
Quote:
I am really juggling whether to take the course that teaches JAVA or not and am trying to gauge what benefit if any (other than the benefit of just learning another language and programming style) it would be for me to learn JAVA.
I would recommend it if you are not already familiar with C-sharp or .net Visual basic, Java is very similar to C-Sharp and both are developments of C++. I would also recommend it if you wish to learn or study modern software design, Object Oriented programming or UML.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.