I’ve noticed a number of job postings at my job that want a working knowledge of Java, and I’m curious if this is a big deal to learn–and is it really a useful thing? Is it the sort of thing that’s worth learning?
and if so, is it terribly difficult to learn? (Right now, I use mainly SQL in my job, and in the past I’ve worked with Perl. I also know html and basic javascript, so I’m not a total stranger to programming, but I don’t really know anything about this language)
Java covers a pretty big range, so Yes it is useful. functionally there are two basic areas. Java as a development language(ie. algorithms, applicatioon design) and J2EE web based. I have met some people who tried jumping right into J2EE(it is high demand) without any basic Java foundation and they usually write crap. It is totally worth it to get to know Java as a proper and well formed programming language before jumping into ‘fixing web pages’. And In doing that you should also get an understanding of the object oriented design purpose. Since as you say you are familiar with Perl, and Perl is a great language useful for many things, but can get you into a ‘let just get this shit done’ mindset, which isn’t conducive to learning Java well, In my opinion.
I don’t feel it is particularly hard to learn, but I knew c and c++ before I started, and it is very similar to those two, so my perspective might be off.
I’m not a big fan of the for dummies, or two weeks type books. I think the basic books by the Deitels are very good for learning. Things build off each other and so if you get through a chapter, you know something else that is useful and used correctly. O’reilly also has great books in general, but I usually get them as refference rather than learning.
JavaScript is NOT Java. Originally, it was called HTMLscript, but that got changed when Java became more popular.
Perl is a dying language, and I say this with a heavy heart because I am extremely proficient in Perl, and sad to see it go. However, Python looks like the new scripting language. (The death of Perl many has to do with politics and the length of time it is taking for Perl 6 to come out. People have gotten sick of waiting. Plus, since Perl 6 would completely overhaul the syntax, why not simply learn another language?).
Java is an extremely important web language and is once again growing in popularity. For a while, it looked like it was dying, but the open source frameworks and transaction engines like Spring and JBoss have made it extremely useful once again.
Java is completely object oriented and that can make it difficult for someone to learn if your previous language basis is a functional based language like Perl. If you learn Java, learn Ant (the basic builder for Java applications) while you’re at it. It would be like learning C without learning Make.
Java is an important and growing language, but it’s very important to learn about Enterprise Java (J2EE) as well. Plus, once you’ve learned the basics, learn about JBoss and the Spring framework.
Java was once thought of as a Write Once/Read Everywhere language. You’d write actual applications in Java, but that never really took off. Instead, when Web 2.0 applications took off, Java became an important language for the web based world.
By the way, if you know JavaScript, learn AJAX. Google’s whole platform is based upon AJAX (which is asynchronous JavaScripting plus some base foundations) and Python. Plus, JavaScript is important if you decide to go with Ruby On Rails or PHP development.
Knowing JavaScripting plus XML transformations (i.e. XSL) is extremely employable.
Is Java easy to learn? It isn’t that difficult once you understand the object oriented nature of it. It’s the Enterprise portion that takes a while to struggle through, and it’s what is really important.
I was laid off last August. I have some headhunters that I work with regularly - if I’m hiring or looking for work. My contact there has told me numerous times that he absolutely cannot find enough Java programmers.
So even though your job market may be different, I think it is worth learning if you are looking for work.
I don’t know Perl, so I can’t tell you how it compares.
My development path has taken me down a different road, so I cannot really tell you the best way to learn it - I always start with a boatload of books. I create a project that would be worth while and I start developing. But that is how I learn. I have dabbled with Java and find it comparable to C++ and C# (but not exactly, there are differences.)
Good luck!
thanks. I’ll probably do it the same way I did everything else, with a bunch of books and a lot of time on the home PC. I was just curious if it was worht my time or not. thanks…and I’m sure I’ll be back here with questions when I can’t figure stuff out.
When I was learning Java, I used a book called “Java: A Beginner’s Guide, Third Edition”, by Herbert Schildt. It is my only Java book, and it will get you through the initial learning curve. There may be a later edition.
Incidentally, one of the benefits of learning Java is that you will be able to transition over to C#/ASPX if you need to. I found this out at my last employer, where I was given the direction of developing a major website for a state government entity. I was told to develop the site in Java. Midway through the project, the client surprised us by demanding that the web site be written in C# and ASPX.
It is amazing how similar the languages are to each other.
And, to reiterate (since it cannot be said enough), Javascript is not Java.
IANAProgrammer, but I’ve heard that the Thinking in Java book is well regarded. (There’s also a Thinking in C book available.) The link takes you to an older free version that the author’s published on the Internets; you can also buy the latest version as well.
JavaScript was originally branded by Netscape as LiveScript. It was then changed to JavaScript at the last second to jump on the buzzword bandwagon. It was then standardized as ECMAScript.
HTMLScript was an entirely different thing.
People keep saying this, yet I have seen no evidence. I’ve had steady Perl-hacking work for ten years, and just got back from a job interview for a largely Perl-based project.
Perl 6 might as well be vaporware at this point, but Perl 5 is a mature and growing language, and with things like Moose has much more sophisticated OOP capabilities than it did a few years ago.
I do like Bruce Eckel. I have his C++ book.
Personally I’d go with C# personally, C# is like Java: Collector’s Edition. Functionally, if you can program in either you can probably switch on the fly but I find C# much easier to learn (and much easier to program for once you know it). You may make a few mistakes when switching, like using brackets to get an element in a collection or forgetting there’s no string primitive in Java, but they’re so close I’d just go with what’s easier.
My experiences:
Background was heavily procedural programming and DB stuff
-
Took longer than I realized to start to get in the groove with the OO way of doing things
-
The language itself isn’t too tough to pick up but the class libraries are large and takes a while to learn
-
Is it worth it? I’ve found that it’s always worth it (regardless of specific language, etc.), you can never predict what opportunities it will create for you
Perl’s not dying any time before Cobol. It may not be the language of choice for new development, but there are millions of Perl scripts out there that will need to be maintained.
Sun’s tutorials seem pretty good to me.
If you want to add programming to your job responsibilities than absolutely learn Java or C#. They are similar enough that neither is really better than the other but I’d suggest Java since just about everything is free. If you use Linux than your only real choice is Java.
Especially close to C#, I’d say. I’ve had to learn C# for my current job, having a background in C++ as well as VB and a bunch of other languages (mostly sciencey stuff like Fortran and Matlab). When C# differs from C++ it seems it’s usually because it’s copying Java: garbage collection, no multiple inheritance, avoidance of explicit pointers (you can use them in C#, but you don’t usually need to and the language kind of discourages it), etc.
Of course, this is useless to the OP, whose background is in SQL, Perl, JavaScript, etc. I’m a johnny-come-lately to web based programming so my advice isn’t much good there. I can only say for those who already know C++ I think Java or C# would be pretty easy to pick up, and going from one to the other would be even easier.
Why not try javapassion.com? It’s free.
Me too. I’ve been doing mostly middling to large scale Perl development and some Ruby/Rails for the last 3 years. I’ve got a reasonable bit of Java experience too, but I just don’t like writing Java, so I turn down most of the Java jobs - and the fact that I can do that speaks to the popularity of Perl (and Ruby). My personal preference at the moment would be Clojure, but it’s not like there’s tons of jobs right now for that skill (but that will change, IMHO).
As for the OP: Java is an industry standard. That means that it’s used a lot, has loads of pretty damn good external libraries that are usually maintained by serious organizations (but no real good collection site like CPAN). It also supports as part of the language conventional class-based OO, static (C/C++ like) typing and it has very good optimizing runtimes.
Java is also intended to be fairly easy to learn and use. If you’ve got some experience writing OO programs in Perl or Javascript, it won’t take you long to get to grips with the language.
However, the standard library is huge and it will take time to know where the useful bits are - and you’ll have to know that or you’ll be rewriting standard functionality, and you’ll probably won’t do it as well as the standard library does.
Also, because of it’s fairly archaic type/OO system and its rejection of function pointers and closures, you will run into situations where you can construct stuff in a few “words” of perl that will take multiple classes in Java, with all their syntactical overhead. Java “patterns” will cover most of these, and you may want to read a book or two about them. IMO patterns are mostly workarounds and in a dynamic, semi-functional language (such as Perl and Javascript), most of these problems are solved much more easily without classes (or with different kinds of classes).
All in all, though, I’d say it’s definitely worth learning, and it might very well get you into some interesting projects/jobs, and if you’re anything like I was when I learned Java, you’ll probably learn a lot of interesting stuff in the bargain.
double post, sorry
To the OP: Stay far, far away from anything written by Schildt. He’s notorious for producing extremely well-written but technically shoddy and wildly inaccurate books. There’s even an entire section dedicated to Schildt in the highly regarded C++ FAQ, which reads in part,
I do websites and Java is really dying. Oh people use it, but not much, it’s being replaced largely by Flash and other Adobe applications.
I haven’t even had an inquiry into Java since 2005. I still get inquires into ActiveX.
Some sites still use Java, but when the come to redesing them a smart designer would leave Java and use a more up-to-date application.
Should you learn Java, sure if you want the job.
It’s like asking which is better ASP, Coldfusion or PHP, they each have their strengths and abilities and some people will only use certain ones on their sites.
I recently went on a job interview and the H/R woman insisted on Quattro Pro. Now I have advanced Excel skills and wouldn’t have any difficulties with Quattro Pro, but she was convinced that Quattro Pro was some kind of specialty.
So people who like Java, will demand it. If you want the job and it pays well learn it.