Manish Kumar

Greenhorn
+ Follow
since Jun 27, 2000
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 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.
Thanks
Manish
22 years ago
If anyone knows how to embed Tomcat in a Java application, please help me becuase I've tried with EmbededTomcat.java but it gives me the following exception:
Thankx

ContextManager: Adding context Ctx( )
cannot process configuration web service using " D:/Temp/webapps/ROOT/"
Security init for Context D:/Temp/webapps/ROOT/ failed
java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkCreateClassLoader(SecurityManager.java:610)
at java.lang.ClassLoader.<init>(ClassLoader.java:234)
at org.apache.tomcat.loader.AdaptiveClassLoader.<init>(AdaptiveClassLoader.java:213)
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
BaseClassName.methodName()
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.

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