Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

My primary language of employment is Java, but it's been a long time since I was on the steep part of the learning curve. One thing I thought I'd throw out there would be to read the Javadoc both for the core api and any other libraries you might be using. It's the Java counterpart to perldoc. I think that would take you a long way.

For example, string splitting? You might look at the documentation for java.lang.String and see it has a split method! Regexes in general? A search from the overview page would reveal the java.util.regex package.

Yes, you're going to be typing a whole lot more :-( If Perl is like Charles Dickins' prose in its expressiveness, Java is more like a third-grader's paper on what they did last summer.

As a general piece of advice, I would recommend imitating other code you can find in your project, or in reputable open-source libraries (say, part of the Apache Group). I think cargo-culting is your friend here, as long as you make sure you understand the code you're copying. This is just my opinion though, so if others have contrasting viewpoints, they might be more convincing.


In reply to Re: From Perl to Java by crashtest
in thread From Perl to Java by ropey

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-24 11:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found