Manish Kumar

+ Follow
since Jun 27, 2000
Merit badge: grant badges
For More
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 Manish Kumar

I'm trying to track the session in my servlet by Session object.. but i'm unable to access the session attributes from any other page except from the page in which this attribute is set.
Any other page gives null for any attribute.
Please help me.. is there any special trick to do that with the session object.
22 years ago
If anyone knows how to embed Tomcat in a Java application, please help me becuase I've tried with but it gives me the following exception:

ContextManager: Adding context Ctx( )
cannot process configuration web service using " D:/Temp/webapps/ROOT/"
Security init for Context D:/Temp/webapps/ROOT/ failed access denied (java.lang.RuntimePermission createClassLoader)
at java.lang.SecurityManager.checkPermission(
at java.lang.SecurityManager.checkCreateClassLoader(
at java.lang.ClassLoader.<init>(
at org.apache.tomcat.loader.AdaptiveClassLoader.<init>(
22 years ago
Marcus Mock exam 2: Q#57
Which of the following statements are true?
1) Adding more classes via import statements will cause a performance overhead, only import classes you actually use.
2) Under no circumstances can a class be defined with the private modifier
3) A inner class may under some circumstances be defined with the protected modifier
4) An interface cannot be instantiated
the given answers are
3 & 4
but it sould be only 3 because we can make an object of an interface in the case of anonymous Inner Class by the following way:
interfaceX obj=new interfaceX(){ //anonymous inner class};

please put some comments on it

I do not agree with Herbert's argument: "Normally within an overriding method you want to be able to call super.method1() "
The exact definition of Method Overriding is (as given in "The complete reference Java2 by Patrick Naughton):
"In a class hierarchy, when a method in a subclass has the same name and typ signature as a method in the superclass".
This difination doesn't mean that a overriding method should be able to call the super.method1()
But still you can call the original method from the overriding method by
Hi Vivek,
Late-binding of the method is necessary for the polymorphism, but the static methods are bounded by the compiler (early-binding). This shows that you can not use the concept of polymorphism in the case of static methods. But yes, it can be overriden 'coz overriding and polymorphism are not the same thing.

You are right. There isn't any correct answer, because a top-level class can only be public or 'friendly'.