Rajesh Nagaraju wrote:
Dave Lorde wrote: There are various different GC strategies available (you can set them on the command line).
Dave, correct me if I am wrong this is only from jdk1.4
Lavanya Halliwell wrote:so I think I understand what you're saying, and that it's will call the GC when the runnable class or thread finishes or goes out of scope.
umasankar puranam wrote:Hi Dave Lorde,
Could you please give me sample non-recursive code in Java to delete all files, directories, and sub-directories in a drive?
pete reisinger wrote:...
I thought that the second option is better (as you said, floating point rounding) but could be slower - which doesn't really matter (early optimization = evil)
jose chiramal wrote:Also I read this point "If you need to change your design frequently,
you should prefer using interface to abstract."
In the code ranch faq i read this : "use an interface if you're sure the API is stable for the long run"
Aren't both these statments contradictory ?
jose chiramal wrote:I have a class Car(it has methods enginespecs and color), and there are two sublcasses to it, BMW and Toyota
In this scenario how do I know whether to use an interface or class hierarchy.
Paul Clapham wrote:Let's suppose you implement this business rule ("The hire date can't be before the date the company was formed") by having this Date object throw an exception. That's certainly valid Java code, and it might be the right thing to do in some contexts.
So yes, you can certainly implement your constructor as you originally asked. From a technical point of view, that is. But there are a lot of situations where you shouldn't implement it that way, instead having something else validate the data before calling the constructor.