Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

rama murthy

Ranch Hand
+ Follow
since Jan 13, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by rama murthy

Thanks for the response Gilles Marceau.

Yes we can do it.

Use util.Date's toString() method to convert the date to String form and use String's equals() method.

String's equals() method takes only date into account and doesn't consider milliseconds.

Here is the code and output

[ February 18, 2007: Message edited by: rama murthy ]
15 years ago
I need to compare the current dates ONLY. Not the milliseconds. Have a look at the code and corresponding output.

1. compareTo
2. equals
3. before

None od these methods are helping me, as they take milliseconds in to account while comparing the date.

Is there a way to compare ONLY the DATE without taking milliseconds in to account.
15 years ago
Thanks srini.

But even sql.Date is having a constructor that takes milli seconds right?

I didn't fully understand your answer.
15 years ago
could you please throw more light on this topic.
15 years ago
What is the difference between sql.Date and util.Date

Please don't tell sql date is a sub-class of util.Date
15 years ago
Thank you very much both of you.
15 years ago
Is it possible to get the current sysdate only using sql date. Because sql date has only one constructor that takes milliseconds as parameter.
15 years ago
Guys can you please tell one good forum for oracle discussion. Is there any site like javaranch for oracle.
15 years ago
class Test {

public static void main(String[] args){

new Test().stringTest();


public void stringTest() {

String secondName = null; // Version 1
String secondName = ""; // Version 2
String firstName = "Java";

secondName = firstName + " Ranch";




What is the difference between version 1 and version 2 in initializing the String.
15 years ago
I am going to refactor a class that has around 10 methods. In every method I am instantiating the same class, lets call it "Display class".

So its almost 10 instantiations of same instance. Wouldn't it be a better design to put that instantiation in a singleton class and invoke the singleton from all the 10 methods. Wouldn't it save a lot of memory in heap.

If singleton is NOT correct kindly let me know why and other work arounds for this type of issues.
Kindly let me know the difference between and

When one should be used over another.
15 years ago
Eric I didn't understand what you said.

Kindly let me know whether what I said was correct.
Can we invoke a function that has 3 parameters with one.


function handleAccountEvent(evt, arg, rowId) { }


Scripts in the head section:
Scripts to be executed when they are called, or when an event is triggered, go in the head section.

Scripts in the body section:
Scripts to be executed when the page loads go in the body section.

Is this correct. Is this a standard to be followed.