Personally, I don't have much of a problem with Java. We're using it to develop our Web applications, and it works fine for that. It all boils down to using the right language for the job. Granted, Perl is great, but it's not a be all, end all solution. I'm not saying that Java is that solution either, but there are some cases where (IMHO) it's easier to get things done. Take, for example, session handling. In a Java Servlet, I just need to say something like
HttpSession session = request.getSession(); session.addAttribute("key","value");

if I want to add something to a persistent session. In Perl, this can be done (see Apache::Session), but it doesn't have the same flow to me. Sure, somebody can write a Perl session handler that works like its Java counterpart, but that's not the point I'm trying to make here. I'm saying that in this case, Java works better for me.

One of the driving design issues behind our site development is to make eveything server-side to the point of excluding client side scripting (JavaScript, VBScript,etc). This means that we must perform all of the input validation in the Java Servlets and Java Server Pages. This is a case where Perl is by far the superior language. It's so much easier to run a string through a regex than to use Java's String methods. (Of course, somebody has written a regex package for Java, but once again that's not the point I'm making.)

As far as the examples that you provide, System.out.println("Hello"); should be familiar to anyone who's had exposure to Object Oriented Programming. Since you said you're new to programming in general, I can understand your confusion.

The second example illustrates a very simple example of Java's error handling. Instead of die-ing, catching the error can let you do other things like retrying the open or notifying another process. I'm not sure if Perl supports error handling in the same manner (try and catch, or similar), but I'm sure somebody here can clue me in.

Guildenstern
Negaterd character class uber alles!

In reply to (Guildenstern) Re: "Obviously, You Will Need a Java Course..." by Guildenstern
in thread "Obviously, You Will Need a Java Course..." by azatoth

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.