arulraj michaelraj

Greenhorn
+ Follow
since Mar 07, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by arulraj michaelraj

1. What is the difference between capacity and size in vector?

2. why the vector class has methods capacity() and size() separately & what is the use of them?


Please reply me...


Thanks
Arulraj
17 years ago
Hi,


I know serialization concept. Generally if you want to make a class as serializable,you can implement serializable interface..

once we implement it, jvm take care of the object to be serialied by using writeObject and readobject method().
But my doubt is that can we override these methods directly in our own class,so that we can achieve that serialiable concept?
17 years ago
what is the difference between struts tags like struts-html.tld etc... and jstl tag?
17 years ago
I have one doubt in design pattern...

Can we apply any other design patterns like factory pattern etc.. in struts framework?

Let us assume that i have an application which was developed by struts framework... i have a new feature which has to be implemented in existing application. But i can realize that factory method is best choice to fulfill that scenario.. In that sense, can we apply this factory method in existing struts framework?
In form tag, we can give servlet name instead of struts action class by using action attribuge....


Really i don't know whether it will work.... just i am asking ... i didn't try the above one......
17 years ago
Can we apply struts tag libraries like struts-html.tld to a servlet file?

It means that form can be constructed with struts tag libraries and it submit the request to ordinary servlet file by putting servlet name in form tag instead of action class.
17 years ago
1. Can we provide our own serialize concept by overriding method "writeObject(java.io.ObjectOutputStream)" in a class?

2. what about java-bean? sould we implement serializable interface for java bean to store the object of that bean?
17 years ago
Thanks for reply.


If we don't implement serializable interface, what will it happen?
17 years ago
Thanks jan....
17 years ago
if you want to have the state of object for a class, we go for serializtion concept. It means that we just implent serializable interface for our class.

Generally we don't implemment it in a class. Even if it is not implemented, the state of object(serialized)is serialized.


how it is possible?

How will take care of it?

How it is possible for java bean?


Can you please explan it...
17 years ago
I have one doubt in abstract method.

Why can't we apply static keyword for abstract method?

Can you please tell me the reason?
17 years ago
thanks jesper....
17 years ago
i am arulraj and have a doubt in inheritance..

please see the following example.

class A
{
int a=10;
}
class B extends A
{
int a=20;
}

A objA=new A();
B objb=new B();

objA=objb; // 1
objb=objA // 2 it says compiler an error.


In the above example , if you assign a subclass object to a superclass object, the program compiles and executes...

if you do reverse operation (assign a superclass object to subclass object), the compiler says an error....

1. Can you pleas explain it why this one is not allowed?

2.
System.out.println("objA.a:"+objA.a);
it prints value 10.
May i know why it gives the value 10 instead of 20?

3.. what is difference between object and object reference?
17 years ago
i am arulraj and have a doubt in inheritance..

please see the following example.

class A
{
int a=10;
}
class B
{
int a=20;
}

A objA=new A();
B objb=new B();

objA=objb; // 1
objb=objA // 2 it says compiler an error.


In the above example , if you assign a subclass object to a superclass object, the program compiles and executes...

if you do reverse operation (assign a superclass object to subclass object), the compiler says an error....

1. Can you pleas explain it why this one is not allowed?

2.
System.out.println("objA.a:"+objA.a);
it prints value 10.
May i know why it gives the value 10 instead of 20?

3.. what is difference between object and object reference?
17 years ago