Why Java?

Java compated to other programming languages

  • (2 Pages)
  • +
  • 1
  • 2

27 Replies - 17690 Views - Last Post: 29 March 2010 - 08:52 PM Rate Topic: ***** 3 Votes

#1 darek9576  Icon User is offline

  • D.I.C Lover

Reputation: 198
  • Posts: 1,688
  • Joined: 13-March 10

Why Java?

Post icon  Posted 15 March 2010 - 06:49 PM

This is a different type of question that i would like to ask all java and non-java programmers. (Hopefully i put it in the right place...)
Anyway...
I am a fresher this year and i decided to study Computer Science with lack of any prior knowledge.I have to admit that it is very challenging but very rewarding at the same time and im enjoying it a lot.

Because i havent done any programming before going to uni, i never "experienced" any other programming language and im programming now in Java but its not becasue i want to but becasue we cover it in our course.

So i was always curious about other languages.. Some people say that Java is not powerful, slow etc that C/C++ is better and therefore i started wondering where does Java stand in the world of programming? Is it gonna be useful when i graduate (in 3 years)? Is Object Oriented Programming the future of programming or lets say declarative is better? Maybe does the usefullness of a language vary on what i want to do e.g software development, web development?

So if people could post their opinions on the issue that i have outlined, then it would be very helpful not only to me i guess but also to people who want to learn programming but dont know what language to pick..

Thanks for replies in advance

darek

This post has been edited by Dogstopper: 16 March 2010 - 07:36 AM


Is This A Good Question/Topic? 1
  • +

Replies To: Why Java?

#2 erik.price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 485
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: Why Java?

Posted 15 March 2010 - 07:03 PM

*
POPULAR

Quote

Because i havent done any programming before going to uni, i never "experienced" any other programming language and im programming now in Java but its not becasue i want to but becasue we cover it in our course.
Java is a great first language. It teaches strong OOP principles, and has features such as garbage collection which help novices avoid things like memory leaks that can occur in a language like C due to the accidental (mis)use of pointers

Quote

Some people say that Java is not powerful, slow etc that C/C++ is better
While this may have been true in the early days of the language, it is much less so today. Any well written Java program is a strong contender to an equivalent C/C++ program. Of course, C/C++ have the benefit of AOT compiling, where Java compiled just in time (JIT), but the speed difference is probably insignificant.

Quote

Is it gonna be useful when i graduate (in 3 years)?
Simply speaking, yes. Java has been around since the mid 1990's, and has been getting more and more popular since its creation. It has expanded from the desktop to servers (EE) and mobile development (ME/Android)

Quote

Is Object Oriented Programming the future of programming or lets say declarative is better?
This is more of an opinion, but I would say object oriented language are used more than not in industry; with Java, C++, C# and VB.NET being some popular examples.

Quote

Maybe does the usefullness of a language vary on what i want to do e.g software development, web development?
Java is very popular for both desktop and web development. Hit up your favorite job search website and see how many jobs posted under programmer list Java in the requirements somewhere
Was This Post Helpful? 19
  • +
  • -

#3 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8328
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Why Java?

Posted 15 March 2010 - 09:29 PM

But probably that post in THIS forum the answers won't be 100% impartial :bigsmile:
But anyhow good show Erik we can't say that you do not preach for your parish
Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10468
  • View blog
  • Posts: 38,799
  • Joined: 27-December 08

Re: Why Java?

Posted 16 March 2010 - 06:55 AM

View Posterik.price, on 15 March 2010 - 10:03 PM, said:

Quote

Maybe does the usefullness of a language vary on what i want to do e.g software development, web development?

Java is very popular for both desktop and web development. Hit up your favorite job search website and see how many jobs posted under programmer list Java in the requirements somewhere

I can speak to this one. In my hunt for an IT internship this summer, all of the Java jobs specifically list Java EE, not Java SE or Java ME.

In the professional world, Java is becoming increasingly popular for a number of reasons. As erik.price said, Java is available for Enterprise and web development, desktop applications, and mobile devices. The big reason, though, is cross-platform compatability. When you work in C, C++, C#, VB.NET, etc., you have to compile the code for each specific platform. However, with Java, you only have to compile it once, and you can run it from any platform so long as a JVM is installed. What happens is, the JVM interprets this compiled bytecode on runtime (JIT).

@erik.price: I agree with pbl; very good explanation! :^:
Was This Post Helpful? 0
  • +
  • -

#5 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2871
  • View blog
  • Posts: 11,026
  • Joined: 15-July 08

Re: Why Java?

Post icon  Posted 16 March 2010 - 07:35 AM

*
POPULAR

Awww...I missed this one! I actually wrote an article for my website a while ago on this very topic. I'll outline it for you here:

Why Java?

Java is Object Oriented
Java has an extraordinary strength when it comes to programming style and structure. The requirement for all Java code to conform to Object Oriented Standards is one of the defining traits of the language, but it also is quite intimidating for beginners. Object Oriented Programming (OOP) is the idea that a program can be broken up into "objects" and those objects have their own attributes and methods which define them. I go into detail in a later tutorial, because it is too complex to solely explain here. Needless to say, OOP reuses code more efficiently than non-OOP languages like C, and it provides more robust solutions to problems.

Java Runs Everywhere
Java is compiled and iterpreted, and what does that mean? Well, first, Java is compiled. Like C++, Java is compiled (translated from human-readable code into computer-understood code), but unlike other languages, it is not compiled into 1's and 0's, but it is instead compiled into a code called bytecode. Bytecode cannot be run directly on the computer, so the bytecode is interpreted by the Java Virtual Machine (JVM). The JVM reads the bytecode and then the appropriate machine code is executed. This allows for code compiled on any Operating System like Linux to be executed on any other operating system like Windows or Mac. Any machine that can run a Java Vitual Machine can run Java.

Java Is Simple
When I say that is is simple, I do not mean easy. I mean that many complex unecessary stuff that exists in C and C++ is now managed by the JVM and the programmer does not have to worry about that stuff anymore. All this "complex stuff" consists of direct memory manipulation, which involves making space for a variable, doing stuff in that memory space, and then removing it when finished. That's called Garbage Collection, in case you wanted to know.

Java Is Safe
Java has great support for exceptions, or issues that occur during runtime. These exceptions disallow hackers and malicious code from causing an issue on the system level. Any of these unsafe operations are thrown by the JVM and unless the programmer specifies how to handle the error differently, the program crashes, but an illegal operation RARELY causes an issue.

Java and the Internet
Java technology is made for the web. In the mid-1990's Java technology was first integrated into browsers in the form of Applets, which are little, built in Java programs. Now, Java still remains popular on the web through Java Servlets, JSP, and Java Web Start. Regardless of the technology, Java is truly made for the web, however, also in previous years, Java has progressed to being one of the most widely used programming languages of the day.
</end of paper>

Since you want opinions from non-Java programmers too, I think I'll feature this.

This post has been edited by Dogstopper: 16 March 2010 - 08:02 AM

Was This Post Helpful? 5
  • +
  • -

#6 Guest_w3bdev*


Reputation:

Re: Why Java?

Posted 16 March 2010 - 08:33 AM

Wow, this is a very loaded question. Haters / Other language gurus can get heated on this subject, as well as, native Java programmers defending their language like schoolboys on a playground.

Ultimately, Java is just another language out there in the jungle of programming. Its a good language to begin OOP concepts and learning basic programming structure. With that said, the usefulness of a language is what you make it. Will you use it when you graduate? If this is one of your first programming classes, then you are far off, in my humble opinion, from planning your programming career, of if you want to even program.

Ill keep it short and sweet. If you like programming in general, great. If you don't feel its your 'thing', then you can try some other languages, and see if something else fits you better. If not, there's hundreds, if not thousands more study areas in IT, you just have to find the area that is right for you.

Good luck.
Was This Post Helpful? 1

#7 kingfeanor  Icon User is offline

  • D.I.C Head

Reputation: 44
  • View blog
  • Posts: 60
  • Joined: 18-April 09

Re: Why Java?

Posted 16 March 2010 - 08:57 AM

*
POPULAR

I am 5 years out of college and have been well served by my academic use of both C++ and Java. In fact, I was hired at my first job because my college taught C++. Object Oriented langauges are powerful, understandable and widely used (as others have already noted).

I would encourage you to learn other programming paradigms however. When you code enterprise software and have to deal with threading, you will quickly understand one of the limitations of traditional object oriented langauges. Learn a functional language (like ML, Scheme or Erlang). Erlang in particular is quite a powerful language for situations where high degrees of threading are necessary along with functional correctness (or at least high uptime). Learn a logic language (like Prolog). Stretching your mind to understand how to solve a given problem in all three of these paradigms will make you a better coder in the one you find yourself using most. I don't usually code in Erlang or ML, but I can write a better OO recursive algorithm because I have. Another mind stretching technology is XSLT.

In my experience, CS fundamentals are far more important than language. For your college career, pick a language or two and become good at them. It doesn't matter much which ones. Then focus on understanding compilers, operating systems, databases, data structures, algorithm design and analysis, etc. Over your career you will code with many langauges and tools (many not yet invented) so the language is less important then the fundamentals of knowing how to solve a given problems with a computer (or cell phone or embedded system, etc.).
Was This Post Helpful? 16
  • +
  • -

#8 espirator  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 07-March 10

Re: Why Java?

Posted 16 March 2010 - 11:09 AM

Quote

Because i havent done any programming before going to uni, i never "experienced" any other programming language and im programming now in Java but its not becasue i want to but becasue we cover it in our course.

So i was always curious about other languages.. Some people say that Java is not powerful, slow etc that C/C++ is better and therefore i started wondering where does Java stand in the world of programming?


Every programming languages have their own advantages. For instance, you can run the C codes without an operating system(That's what i learned in the course today :) But You cannot run a java or C# code without an operating system :clap: It's an disadvantage of java. But being OOP and some other property makes java useful :)
Was This Post Helpful? 1
  • +
  • -

#9 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2871
  • View blog
  • Posts: 11,026
  • Joined: 15-July 08

Re: Why Java?

Posted 16 March 2010 - 11:15 AM

Yes, you're right, some languages that don't compile down to straight up assembly NEED something to do it for them. However this does not necessarily have to be an operating system. In theory, one could have a Java, Python, Ruby, ... operating system, and the only thing that they would HAVE to have is an interpreter on the electronics itself (which is actually beginning to happen in some computer chips nowadays).
Was This Post Helpful? 0
  • +
  • -

#10 scalt  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 63
  • View blog
  • Posts: 342
  • Joined: 22-November 07

Re: Why Java?

Posted 16 March 2010 - 03:34 PM

In all honesty though, if you are writing something that will be not be running with an operating system (such as software for an embedded device) then you will probably not be using a high level language such as Java/C#/VB anyway (a - overkill, b - clunky for smaller or high speed devices).
Was This Post Helpful? 0
  • +
  • -

#11 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10468
  • View blog
  • Posts: 38,799
  • Joined: 27-December 08

Re: Why Java?

Posted 16 March 2010 - 03:39 PM

Yes, you're right- Java is not the right tool for OS specific or low-level tasks. Since Java is designed to be platform independent, it makes it very difficult to write platform-dependent software with it. Even with the Java Native Interface (JNI) which makes it easier to do some lower level tasks, it is still rarely realistic to use Java for these tasks.
Was This Post Helpful? 0
  • +
  • -

#12 tectonic.software  Icon User is offline

  • D.I.C Head

Reputation: 18
  • View blog
  • Posts: 88
  • Joined: 12-February 10

Re: Why Java?

Posted 16 March 2010 - 03:54 PM

To me, Java is an extrodinary product, it brings many features that the average programmer uses (Secure code, Programming speed, etc). But at that they also missed a vital aspect of what programmers expect from most of their languages, and as macosxnerd101 explained, Java is not right for platform specific job's. Java was wrote to be platform independent though so I guess I cannot complain.
Was This Post Helpful? 0
  • +
  • -

#13 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8328
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Why Java?

Posted 16 March 2010 - 10:21 PM

View Postkingfeanor, on 16 March 2010 - 09:57 AM, said:

I am 5 years out of college and have been well served by my academic use of both C++ and Java. In fact, I was hired at my first job because my college taught C++. Object Oriented langauges are powerful, understandable and widely used (as others have already noted).

I would encourage you to learn other programming paradigms however. When you code enterprise software and have to deal with threading, you will quickly understand one of the limitations of traditional object oriented langauges. Learn a functional language (like ML, Scheme or Erlang). Erlang in particular is quite a powerful language for situations where high degrees of threading are necessary along with functional correctness (or at least high uptime). Learn a logic language (like Prolog). Stretching your mind to understand how to solve a given problem in all three of these paradigms will make you a better coder in the one you find yourself using most. I don't usually code in Erlang or ML, but I can write a better OO recursive algorithm because I have. Another mind stretching technology is XSLT.

In my experience, CS fundamentals are far more important than language. For your college career, pick a language or two and become good at them. It doesn't matter much which ones. Then focus on understanding compilers, operating systems, databases, data structures, algorithm design and analysis, etc. Over your career you will code with many langauges and tools (many not yet invented) so the language is less important then the fundamentals of knowing how to solve a given problems with a computer (or cell phone or embedded system, etc.).

Jolly good show :^:
First time I see a DIC with more "This post was useful" than actual number of posts
You will screw up all our statistics if you continue like that :D
Welcome at DIC kingfeanor
Was This Post Helpful? 0
  • +
  • -

#14 Harlen  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 40
  • Joined: 08-February 10

Re: Why Java?

Posted 17 March 2010 - 09:08 AM

View Postdarek9576, on 15 March 2010 - 05:49 PM, said:

This is a different type of question that i would like to ask all java and non-java programmers. (Hopefully i put it in the right place...)
Anyway...
I am a fresher this year and i decided to study Computer Science with lack of any prior knowledge.I have to admit that it is very challenging but very rewarding at the same time and im enjoying it a lot.

Because i havent done any programming before going to uni, i never "experienced" any other programming language and im programming now in Java but its not becasue i want to but becasue we cover it in our course.

So i was always curious about other languages.. Some people say that Java is not powerful, slow etc that C/C++ is better and therefore i started wondering where does Java stand in the world of programming? Is it gonna be useful when i graduate (in 3 years)? Is Object Oriented Programming the future of programming or lets say declarative is better? Maybe does the usefullness of a language vary on what i want to do e.g software development, web development?

So if people could post their opinions on the issue that i have outlined, then it would be very helpful not only to me i guess but also to people who want to learn programming but dont know what language to pick..

Thanks for replies in advance

darek


Java provides some protection against injected viruses, I think this may be why it's than some other languages. But, Java is still the most widely used programming language in the business world.

Java tries to rid you of tedious programming techniques and tries to make it easier to learn. Personally, I actually find Java much easier to learn than C/C++ and whenever I listen to C/C++ programmers complain about the tedious typing, I find quick, simple ways to do what they want to do in Java. Java makes it much simpler than other languages, so it's probably the best language to start out with.
Was This Post Helpful? 0
  • +
  • -

#15 carltech  Icon User is offline

  • What did you call me?
  • member icon

Reputation: 28
  • View blog
  • Posts: 997
  • Joined: 19-October 07

Re: Why Java?

Posted 17 March 2010 - 11:46 AM

With the number of embedded devices like cellphones and smart phone on the rise I think it is safe to say that Java will stay around for quite a while.

Java was originally made to embed on small an obscure devices...instead of having to write a C compiler for the device it is easier to just throw the runtime on it and start cranking out code.

Of course the web developers saw how easy Java was to embed and use so they picked it up and Javascript came into play.

I think a better question would be why not use Java. There are times when you need the speed that only C or assembly can give you or the manual memory management of C++. Sometimes it is easier to use .Net languages for some windows apps. Sometimes all you need is a simple script so you can use python or Lua. Oh and lets not forget that DirectX loves to play with C++ and C#.


Oh and I forgot to mention that my brother's car runs off Java.

This post has been edited by carltech: 17 March 2010 - 11:47 AM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2