Few Questions about JAVA

Deepak

B3D Yoddha
Veteran
Which is the best Free JAVA IDE for a beginer like me? I have only some basic knowledge about C++, is it OK if I straightaway start learning JAVA? How long do you think it'll take me to learn it well? In 5-6 months I have to prepare a complete Project (with diagrams/code etc) and submit it for my degree course. Which is easier, Java or .NET? Which of the two has better prospects?

Thanks!
 
Which is the best Free JAVA IDE for a beginer like me? I have only some basic knowledge about C++, is it OK if I straightaway start learning JAVA? How long do you think it'll take me to learn it well? In 5-6 months I have to prepare a complete Project (with diagrams/code etc) and submit it for my degree course. Which is easier, Java or .NET? Which of the two has better prospects?

Thanks!

Well in terms of IDE, theres Netbeans 5.5 and it has the most features out of almost any IDE out of the box. There are various addon packs you can download to do UML diagramming, web design and also an excellent free profiler as well. I am a Java user and so I am a bit biased but .Net has turned out to be excellent but the fact that it is Windows centric is a huge turnoff for me. There is also another IDE called the NEtbeans BlueJ edition IDE which is used for beginners.

If you know C++ Java should be cake. At least from my experience. Get a hold of the Java API. Go through the Sun java tutorials and bookmark the Java Almanac site. (Do a google) And you will be off to a good start.
 
Thanks Surya. Happy New Year! :smile:

Which one should I download? Netbeans 5.5 or Netbeans 5.0 BlueJ?
 
Last edited by a moderator:
Eclipse Eclipse Eclipse Eclipse Eclipse. That is the IDE du jour for Java!

I second that.

Also, it's quite easy to jump from .NET to Java and vice versa. Visual Studio C# Express is a completely free and great IDE if you want to try .NET.
 
Not a fan of eclipse, but I am forced to use it nevertheless (lack of other options). :cry:
 
Which is the best Free JAVA IDE for a beginer like me? I have only some basic knowledge about C++, is it OK if I straightaway start learning JAVA? How long do you think it'll take me to learn it well? In 5-6 months I have to prepare a complete Project (with diagrams/code etc) and submit it for my degree course. Which is easier, Java or .NET? Which of the two has better prospects?

Thanks!

Java is as good a language as any to start learning.
I find eclipse to be a pretty competent IDE.
I personally prefer .net and visual studio, but there are plenty of people who disagree.
 
Eclipse or Netbeans - Both are quite good. It's a bit like Firefox and Opera. :) The former is only so-so out of the box, but there are a huge amount of plugins for it, the latter is a slicker package, but not that many plugins compared to eclipse.

But IntelliJ IDEA still beats both. :) Sadly it's not free...


ERP said:
I personally prefer .net and visual studio, but there are plenty of people who disagree.

Really? .net I definitely can understand (my personal opinion is somewhat mixed), but VS2005 (especially editor, debugger and refactoring/code generation) was a sore disappointment for me (coming from IntelliJ when I started programming in .net). Thank god there's Resharper.
 
I run visual assist, with VS.

I do agree I liked intelliJ or the short time I used it, I'm just comfortable with VS, I use it all day every day, and since I work in C++ for the most part I rarely use the refactoring tools.
 
I run visual assist, with VS.
Looks nice - esp. since it's for C++ as well.

[/quote]I do agree I liked intelliJ or the short time I used it, I'm just comfortable with VS, I use it all day every day, and since I work in C++ for the most part I rarely use the refactoring tools.[/quote]

Ah, ok - when coming from C++ (which should have been obvious from your record here) I can understand that.
It's a bit dangerous when you get used to all the Editor helpers/Code generation/Refactoring tools and you suddenly have to program without much of that stuff. I'm afraid I'm a spoiled brat. ;)

But still - realtime compiler error feedback while you type is the best thing since sliced bread for me.
 
Looks nice - esp. since it's for C++ as well.

I do agree I liked intelliJ or the short time I used it, I'm just comfortable with VS, I use it all day every day, and since I work in C++ for the most part I rarely use the refactoring tools.

Ah, ok - when coming from C++ (which should have been obvious from your record here) I can understand that.
It's a bit dangerous when you get used to all the Editor helpers/Code generation/Refactoring tools and you suddenly have to program without much of that stuff. I'm afraid I'm a spoiled brat. ;)

But still - realtime compiler error feedback while you type is the best thing since sliced bread for me.

Compile times have never bothered me on trivial projects (a few thousand lines), which is pretty much as big as most of mine get in C# or Java, real time syntax checking is nice though.

I was just bemoaning the fact that most of our codebases at work now are so large that an incremental compile takes longer than it used to do a full rebuild when I had to load the source code off tape :/
 
Visual assist is super awesome, I can't even really write code without it anymore :???: I used netbeans for a brief stint of Java and it made me angry, can't remember why exactly...Probably that I had a deadline that was too soon and didn't have anytime to figure it out (or Java , for that matter :LOL: ).
 
Which is the best Free JAVA IDE for a beginer like me? I have only some basic knowledge about C++, is it OK if I straightaway start learning JAVA? How long do you think it'll take me to learn it well? In 5-6 months I have to prepare a complete Project (with diagrams/code etc) and submit it for my degree course. Which is easier, Java or .NET? Which of the two has better prospects?

Thanks!

I'd say it depends on what you're doing. If you're just developing a basic app, .NET is definetely easier, but in my experience it's a hindrance to use it for more serious use. While some simpler programs that would take me an hour in Java would only take me 5 minutes to do in .NET, that's mainly due to Visual Studio (which I think costs over $100 by itself) being a huge help. Autocompletion and a visual GUI designer save so much time! But the actual .net language itself (or is it visual basic?) seems much more limited than Java. The most serious programs I've done on both are games, but I found that rather easier on Java. I've also done some database software for Java, and though I can't say it .NET is as capable/easy or not (haven't done the same in it), I do have to say that Java documentation is infinitely superior to MSDN imho and the programming language just seems better thought out in terms of predefined classes and relations.

As far as good free IDEs....
I've used primarily Textpad, BlueJ, and Eclipse.
Textpad was a nice basic and simple editor that it took me a while to get weaned off of. I liked it. Nice, simple and easy editor to get started off with, and has more functionality than notepad. Or would this technically be nothing more than a compiler and not an IDE?

BlueJ I hated. It automates a few things for you (nothing terribly useful), and seeing a visual representation of class relations is fairly handy for eliminating dependencies. Additionally, it's buggy. It's programmed in Java and runs in the VM, and if I ran a program that caused a runtime error, all future compiles and tests within bluej would operate incorrectly or fail randomly, and I'd have to close out all instances of BlueJ and occasionally even reset the computer to fix the virtual machine.

I've also used Eclipse. Didn't like it at first, it's not the most beginner friendly, but I found it very useful. Quick compile times, and I found it really helped my workflow once I began to understand how to use it better. I believe it's also programmed in Java, but I'm not sure if it's native or runs in a VM. Either way, I don't recall ever encountering the stability issues I had with BlueJ. It also automates some actually useful things for you, unlike BlueJ.

More recently I've used VI a bit. However, only because I've recently switched my major from Electrical Engineering to a dual major in Physics and Computer Science, and one of the Physics professors I work for, along with the CS department encourage using VI. (it's generally standard in class apparently, though outside of class you're free to use any compiler you wish of course, with Eclipse getting the strongest recommendation) Personally, I don't like it, not even a full compiler, just a basic text editor, and it has an annoying interface without an alternative way of entering commands. For my job, I've generally used KEdit or whatever other text editor is installed on the machine I'm using. I do see how VI could be useful for mass data manipulation, particularly databases I suppose, once you get the interface down, but I don't see any reason I have to learn it. They offer a class on it (and other Unix/Linux stuff) that I chose not to take, but I figure I should make an attempt whenever possible to use VI in my job just to get familiar with it if they really are going to force me to use it during class.

Speaking of which, I should also brush up on my programming. I took an AP Test for Data Structures and Algorithms (comp sci AB) back in senior year of high school, and just barely passed after by reading a couple of wikipedia articles the night before after realizing it was on nothing I had ever done before, plus I've gotten a bit lazy with programming (and haven't done that much in a long time) and don't quite remember how to start a program from scratch.
 
More recently I've used VI a bit. However, only because I've recently switched my major from Electrical Engineering to a dual major in Physics and Computer Science, and one of the Physics professors I work for, along with the CS department encourage using VI. (it's generally standard in class apparently, though outside of class you're free to use any compiler you wish of course, with Eclipse getting the strongest recommendation) Personally, I don't like it, not even a full compiler, just a basic text editor, and it has an annoying interface without an alternative way of entering commands. For my job, I've generally used KEdit or whatever other text editor is installed on the machine I'm using. I do see how VI could be useful for mass data manipulation, particularly databases I suppose, once you get the interface down, but I don't see any reason I have to learn it. They offer a class on it (and other Unix/Linux stuff) that I chose not to take, but I figure I should make an attempt whenever possible to use VI in my job just to get familiar with it if they really are going to force me to use it during class.
It is possible to edit any text file in vi or emacs faster than with any other piece of software. Spend a couple hours learning vi or emacs. It's a text editor, yes, either one is more powerful than just about any other piece of software on the planet.
 
But the actual .net language itself (or is it visual basic?) seems much more limited than Java.

Well, .NET isn't only limited to one language. Visual Studio supports C++, VB.NET, C# and J# and you can write .NET software with all of those. In addition, there's more than 20 languages outside of Microsoft's support, which can be used to create .NET-software. These include for example Python.

If you like Java as a language, I suggest you to try C# which is really easy to adopt if you have Java-background.
 
Which is easier, Java or .NET? Which of the two has better prospects?

That is a dangerous question :p but I'll try and be impartial. (which will probably fail).

Java was released at the end of 1996, where .Net was released at the end of 2000. So quite a gap. However, my understanding is the .Net project was started well before the release of Java - while there are many similarities, some are coincidence, some are taking an existing design and improving it. At least this is what a former microsoft employee told me. The bottom line is there is a metric tonne of Java code out there. Heaps. But .Net is catching up. Job wise, I'd be inclined to say .Net programmers are in higher demand than java at the moment.

What needs to be understood is that .Net is not C#. .Net is many things, it is a runtime, it is a low level assembly like language (similar to Java bytecode), it's a supporting class library, etc. Just like java. However java by design ties you to writing java code (well not technically true), where C#, VB.net, C++/Cli, Boo, F#, etc are languages that compile down to .Net IL code. - So they all work together perfectly, even functional languages, etc. Mixing and matching is basically encouraged.

In a Java vs .Net battle, the .Net spec does allow a lot of very useful code related things. Examples would be the extremely good event/delegate model, attributes (reflection meta data), operator overloading, struct boxing, remoting, generics... etc. A number of these now exist in Java in a slightly different form. Each is extremely useful, and heavily used throughout the framework.

The other side of the coin is also the class library. The java class lib is ginormous, where the .Net lib is smaller. However (as a matter of opinion) I'd say the java lib is bloated and somewhat confusing. The naming schemes, for example, can differ wildy throughout java. Java has a huge set of collections, but to be honest I prefer the far more limited (but very functional) set provided by the .net lib.

an example I find appropriate is creating a directory:

new java.io.File(directoryName).mkdir();

System.IO.Directory.CreateDirectory(directoryName);

The Java version clearly has simplicity in mind. They didn't want to add a directory class, and they named the method 'mkdir' - make directory - However both of these lead to confusion if you are looking for the ability to create a directory, it's not obvious you need to create a File... The .Net version is more wordy, but it's a far more logical process to discover the method. And this, in general, is a theme that runs through .Net. It's well structured, consistently named, very wordy*, and very discoverable.

Everything within the standard lib in .Net is located in the System namespace. Two main java namespaces are java and javax.

So I'll say .Net has more features that make the learning curve steeper, but overall it's easier to climb that curve. :) Both are about as easy as each other in the long run. So it's really a coin toss.

However if you are targeting mixed platforms, the choice really is Java. The breadth of Java support is huge. Not entirely consistent, but huge. From cellphones to linux to whatever, it probably will work (although not first time :)). .Net really only works on microsoft platforms right now, eg windows, winCE, xbox360, etc. However there are open source efforts like Rotor, Tao and Portable.Net to support the nix platforms - but they are generally not feature complete.

Prospects wise, Java will still thrive in the nix and embedded world, however in the windows world there is no doubt in my mind .Net will be the primary platform for application development going forward (games too, imo).

Last thing I'll say is J2EE is the devil :p Ok I totally lost my bias now :)

*there is an interface named System.Windows.Forms.IDataGridColumnStyleEditingNotificationService :)
 
However there are open source efforts like Rotor, Tao and Portable.Net to support the nix platforms - but they are generally not feature complete.

Good post. I would like to add Mono to that list. It is sponsored by Novell and quite often referred by Microsoft employees.
 
Thanks everyone for your invaluable input. If I were to spend 2 hours daily on Java, will I be able to learn it well in 2-3 months?
 
Thanks everyone for your invaluable input. If I were to spend 2 hours daily on Java, will I be able to learn it well in 2-3 months?

Learn the syntax well? Definitely.
Learn how to program well... depends on the types of programs you attempt and the quality of the examples and tutorials you find. (you said you're a C++ programmer though so you shouldn't have much problem here)
Learn a substantial amount of the JavaDOC/Java API...eh in 3 months you'd probably be lucky to know 10% of it, but you could learn most of the commonly used stuff.
 
Learn the syntax well? Definitely.
Learn how to program well... depends on the types of programs you attempt and the quality of the examples and tutorials you find. (you said you're a C++ programmer though so you shouldn't have much problem here)
Learn a substantial amount of the JavaDOC/Java API...eh in 3 months you'd probably be lucky to know 10% of it, but you could learn most of the commonly used stuff.
Er, why would you ever need to learn the API stuff? All of the common stuff is very well documented, so using it is pretty much as simple as knowing what class you need in the first place.
 
Back
Top