Dirk Schreckmann

Sheriff
+ Follow
since Dec 10, 2001
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dirk Schreckmann

The Head First Java book includes good introductions to network programming and RMI.
16 years ago
Without repeating specific questions you had, could you please describe in more detail what was not covered in K&B?
Perhaps you just need to add a missing JAR or two to the build path of your IDE. (For example, jt400.jar contains com.ibm.as400.util.CommandHelpRetriever and so jt400.jar must be present in the build path in order to use CommandHelpRetriever. I don't know what JARs or other resources contain the classes you're missing.)

Sometimes adding libraries such as JARs to the build path is as simple as copying JAR files to the WEB-INF/lib folder within your project, if it's a web application.

I'm assuming you just need help configuring your IDE, so I'm moving this to the IDEs forum...
Minor comment:

Instead of using string literals to represent classes, you could use class literals. The current commented-out implementation to check for type instances based on the ending class name segment wouldn't work given instances of two unrelated classes, where the name of one of them happens to end with the complete name of the other (e.g. A and AA, or Point and CounterPoint).

Don't read the next paragraph if you'd rather investigate and discover on your own how to use class literals and methods of Class objects.

To clarify my minor comment above, arrange(String className, Vector v, int p) could be changed to arrange(Class clazz, Vector v, int p), and Test.arrange("String", v, p); could be changed to Test.arrange(String.class, v, p);. Then, you could use the isInstance(Object) method available to clazz.
16 years ago
The 2.0.x documentation linked from http://struts.apache.org includes release notes, and links to release notes for previous versions, which list the "new features" with each release.
16 years ago
mohan,

It's not clear to me which part of this task you're stuck on.

If you're unfamiliar with working with arrays in Java, part 9 of Bradly Kjell's "Introduction to Computer Science using Java" includes good lessons and practice exercises to help learn the subject.

If you're not yet comfortable writing data to a text file, chapters 82, 83 and 87 in part 13 of Kjell's lessons cover the subject well.
16 years ago
For a very good explanation of polymorphism and overriding, including why one might use them, take a look at "How my Dog learned Polymorphism" in the JavaRanch Campfire Stories. (Note that the "Animal" parent class could just as easily be an interface, with the "Dog" class then implementing the interface, instead of extending the parent class.)
16 years ago
Welcome to JavaRanch, krishnan!

The API documentation of the TreeMap class is available at http://java.sun.com/j2se/1.5.0/docs/api/java/util/TreeMap.html.

After reviewing it, as Gavin recommended, do you have any ideas for implementing the descending order functionality? If you're still totally stuck, I'm sure some friendly JavaRanchers would be glad to help nudge you further towards a solution.
16 years ago
Short Answer: Use the J2SE 1.4.2 Documentation Download link at http://java.sun.com/j2se/1.4.2/download.html

How I Found This Link: At http://java.sun.com in the "Popular Downloads" section, I clicked on "Java SE" to go to the "Java SE Downloads" page. From the "Java SE Downloads" page, I browsed to the "Previous Releases" page. From the "Previous Releases" page, I followed the link for "J2SE 1.4.2 Downloads".
16 years ago
I'm not able to recreate the error you're reporting (even if I change the operating system time and/or timezone), and I wouldn't expect you'd need to adjust for DST, since the TimeZone class documentation describes that TimeZone "also figures out daylight savings."

What time zone ID are you using? What's your local time zone?

What displays for you when you run System.out.println(new Date(System.currentTimeMillis()));?
16 years ago
Welcome to JavaRanch, John!

Perhaps where to go next depends somewhat on what you're already familiar with and what you want to accomplish.

If you're new to programming in general...

In between chapters while reading those great books, write lots of programs. Hundreds of them.

Places to find Java programming exercises:
  • The JavaRanch Cattle Drive
  • Roedy Green's List of Student Java Projects
  • Projects associated with various chapters of Bradley Kjell's Introduction to Computer Science using Java - the project links are on the right side of the page
  • Projects associated with various chapters of David J. Eck's Introduction to Programming Using Java

  • If you're already a great programmer, then perhaps improving on OOAD (Object-Oriented Analysis and Design) and design patterns understanding, with books like "Head First Design Patterns" and Craig Larman's "Applying UML and Patterns", is the way to go.

    If you want to learn server-side programming, then the JavaRanch Cattle Drive includes a decent introduction to servlets and JSP's. After this introduction, the next steps might include learning a web application framework like Struts, or learning more JEE (Java Enterprise Edition) technologies like EJB's.

    If you want to write programs for mobile phones, then jump into J2ME.

    If you want to write desktop programs with pretty GUI's, then maybe dive into Swing.

    Some folks pursue certifications as a means to focus and organize learning efforts, and to validate understanding.

    Etc... (It's time for me to focus my efforts back onto my work...)
    [ June 12, 2007: Message edited by: Dirk Schreckmann ]
    16 years ago
    The API documentation Jesper referred to is available at http://java.sun.com/api. This documentation is definitely one of a Java developer's Super Best Friends.

    If you're not yet familiar with using regular expressions in Java, this might be a good time to start learning about them. A decent introduction to this subject is in the two "An Introduction to java.util.regex" articles in the JavaRanch Journal.

    Way Big Hint ('cuz you got lucky that I was just now writing a regular expression for something else):
    [ June 12, 2007: Message edited by: Dirk Schreckmann ]
    16 years ago
    sudhan,

    Following what Keith explained concerning "passing by value", you might also like to read the "Pass-by-Value Please" story in the JavaRanch Campfire Stories. This story certainly helped me to understand Java references (and objects) better.

    If you're still not confident in understanding how the example application works, then it may help others to help you, if you were to explain some more details about what you expect the program to do, and how you currently understand what the program actually does.
    16 years ago
    Welcome to JavaRanch, Arnav!

    How expressions are evaluated by a Java compiler or runtime environment is described within The Java Language Specification (also known as the JLS, for short). If you're not already familiar and comfortable with this document, as you learn Java, you may find that you soon will be (though it may initially appear to be somewhat intimidating, i.e. technical and boring).

    Different implementations of Java compilers or runtime environments should all adhere to the rules in the JLS (otherwise, I suppose, they'd arguably not be Java compilers or runtime environments). (Note: The Java language has changed slightly since version 1.0, though I don't presently recall how any of these changes pertain to this conversation.)

    The expression 7 + 2 + "JP" + 3 + 2 should be evaluated the same way by all Java compilers and runtime environments. The evaluation order is especially relevant. As you've likely already discovered, this example expression is evaluated from left to right (and will always evaluate to "10JP32").

    Are the steps of the evaluation of this example expression clear?
    [ June 12, 2007: Message edited by: Dirk Schreckmann ]
    16 years ago