Nikhil Vasaikar

Ranch Hand
+ Follow
since Aug 18, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nikhil Vasaikar

This example might help you understand the Decorator pattern better.
Hereyou can find an example of Factory and Abstract factory in action together.
Here is an example that uses an Abstract Factory and a Factory together.
Hi,

There is quite a lot of requirement for Java/J2EE professionals in Bombay, especially with Cap Gemini, Mastek, Accenture, TCS.

Nikhil
19 years ago
Great Explanations...Thank You!

Regards,

Nikhil
Hi Kalyan,

Hope the following code helps.


Regards,
Nikhil
[ November 17, 2004: Message edited by: Nikhil Vasaikar ]
19 years ago


Originally posted by Nicholas Cheung
Your problem should be, as "getDay" is the name of the class, so do the method name is the same name, you should new the class object and then call its *getDay* method.

I am not sure whether you can name a method as same as the class name, in case you can, you should call it by:



This is exactly what is required to be done. You cannot call a method without the classname or object reference, unless it is present in the same class or inherited.

Nikhil
19 years ago
I suggest you to refer to the following example. Hope this answers your queries.


Regards,

Nikhil
19 years ago
What are the pros and cons of using Abstract Class or Interface? This eventually leads to inheritance or object composition if I am right. I was wondering if there are any guidelines to decide on what to use Abstract Class or Interface. So far all I understand is that we use abstract class when we have common implementations of one or more services across all derived classes.

Nikhil
Try putting it in <jdk_home>\jre\lib\ext folder

Nikhil
19 years ago


Hope this is what you want.

Nikhil
19 years ago


Originally posted by Ilja Preuss
No, it cannot be overridden



I agree to it. I was wrong

Nikhil
19 years ago


Output: Parent

It still prints Parent. I guess this means that the protected static void printMe() is inherited. It can also be overridden in the child class.

Nikhil
19 years ago
Hi,

I suggest you refer to the Structure for DAO post. May be you find something that you are looking for.

Regards,

Nikhil
[ November 09, 2004: Message edited by: Nikhil Vasaikar ]
Hi Corey,

I suggest, you may also make the DAO class more general by using a DAO interafce that is implemented by the actual DAOs


All your client knows is the DAO class all the DAO class knows is the AbstractDAO interface. The client does not need to choose between the DAO objects.
This way changing the code as per the growing requirement would be easy- the design for change approach.
This is what I could think of now. Hope this helps.

Nikhil
[ November 05, 2004: Message edited by: Nikhil Vasaikar ]