This week's book giveaway is in the Java in General forum.
We're giving away four copies of Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework and have Michael Redlich on-line!
See this thread for details.

Lance Finney

Ranch Hand
+ Follow
since Apr 26, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Lance Finney

Typically, getters for boolean values are called isXXXX(). Sometimes the grammar gets pretty convoluted to get it to start with "is", so I've seen hasXXX() and areXXX().
20 years ago
Has anyone used a good Gui Testing Framework? I'm looking at JfcUnit and Abbot, and I was hoping to hear good appraisals of them.
Lance
21 years ago
There's probably a more efficient way, but you could do this:
21 years ago
What type of applications are you planning to develop? If you need J2EE (Server-side development with EJBs, Servlets, etc), you will need a better OS. Otherwise, I don't know a reason that you couldn't use the 1.4.1 SDK, but I haven't tried it.
21 years ago
Orion is much more forgiving than a lot of the other app servers out there. My team at work is designing an enterprise application, and we used Orion as our primary development application server. Since we're almost done, we're now testing the application on WebLogic and SunONE, and we have to be a LOT more specific with our deployment descriptors and packaging with those app servers than we had to be with Orion.
22 years ago
I had something like this a while back. I think the answer is to use HH instead of hh in the output pattern.
22 years ago
Just to clarify, the concept you are suggesting is overloading, not overriding.
Overloading is providing different signatures for the same method name.
Overriding is writing a new method with the same signature and name as one in a superclass.
22 years ago
I don't post much anymore (I finished JDBC a few months ago), but I check out the forum a few times a week just to check things out. I help when I can, but the quick posters usually beat me to the punch. I also check for new tracks.
22 years ago
Take a look at java.text.NumberFormat. I think you can get what you want through that.
Be careful about trying to save your integer with the prepended '0'. 01 is not the same to Java as 1. 1 is in base 10. 01 is in octal (base eight). It doesn't really matter for 0-7, but 08 and 09 don't exist, and you could have problems.
22 years ago
Actually, Void is a datatype, if you're talking about the Void class. It doesn't do much, but it's used in reflection.
22 years ago
Two reasons:
1) Using exceptions for flow control basically means that you are using exceptions as a goto mechanism, and gotos make for messy, spaghetti code.
2) Creating and catching an exception brings overhead of creating an object. This is much slower and more expensive than using standard flow-control.

The try block is where your normal code codes. The Catch block is where you put code that deals with the problem that caused the exception.
22 years ago
The Cattle Drive is good far a lot of Java, but there's no GUI or Applets in it. If you want general practice, take a look. I don't know how focused you are on the categories you mentioned.
22 years ago
I'm not sure about the first two, but Collections are used all the time. If you write a video store application, you'll need to keep a List of videos the customer is renting. Maybe you'll have an employee screen, so you'll want to display a Set of all the employees on the screen. If you want to keep track of the days overdue for each video, you could have a Map with the video as key and days late as value.
I hope these few examples help.
22 years ago
I can think of two reasons off the top of my head:
1) Using exceptions for flow control basically means that you are using exceptions as a goto mechanism, and gotos make for messy, spaghetti code.
2) Creating and catching an exception brings overhead of creating an object. This is much slower and more expensive than using standard flow-control.
22 years ago
I first became acquainted with Orion here on the dirve, but then I got hired by a software company to do Java development. To my surprise, they were using Orion, too! We've developed a large distributed app with servlets and EJBs using orion as the primary App Server. As we've gotten closer to market, we've started porting our deployment to some bigger names like WebLogic, but mostly we work on Orion.
Tomcat, however, is more of a reference implementation. There are a lot more bugs in it than in Orion. In fact, Oracle 9i Server, which is trying to be a big player, is really just Orion that Oracle is licensing.
So, by using orion here, we're getting experience with a free, standards-compliant system that is becoming a big player in the market.
I'd like to keep Orion.
22 years ago