Anuj Kumar

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

Recent posts by Anuj Kumar

thanks akhi i am uing the same type of class to cast it but still it is throwing this problem
I am using EJB2.0 .I am executing a query that first populate data into a bean and then add this bean into a list and i am returning this list from a business method in the stateless SessionBean. Everything is fine it is executing the query and returning the list containing the beans but when i used to cast the list.get(i) to my bean type then it throwing ClasscastException in my Action class in the web client .Bean class id serializable..?? please help
what was the passing marks for this exam
please tell me can we write xml in a jsp page ,if yes then how
16 years ago
JSP
Please tell me the Difference between URI,URL and URN

thanks in advance..
16 years ago
JSP
what is the significance of Context Path please clear it.......
thanks in advance
16 years ago
what is the use of ServletContext getContext(String uripath) method...
and how to use it please clear it thanks in advance
16 years ago
Thanks to all of you...
i cleared this exam on 14th of Jan 2008
16 years ago
in the second program when you are coding like this...
parent p=new parent();

castingTest c=new castingTest();

p=c;
c=(castingTest)p;//Line A
then p=c causes reference variable p to refer to object of type castingTest and when you are typecasting in Line A then it checks for the runtime type of the object referred by the reference variable which is of type castingTest therefore there is no problem.....
i also thought the same that it will print A and then throw exception ,but it is not doing the same that is why i asked the question why please make it clear thanks
what will be the output of the following code........
in my machine it is printing A but i think it should throw IllegalThreadStateException but it is not throwing any exception .I run this program so many times on my machine but is is running fine and throwing no exception.


class A extends Thread {
public void run() {
System.out.print("A");
}
}
class B {
public static void main (String[] args) {
A a = new A();
a.start();
try {
a.join();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
a.start(); // 1
}
}


[ January 10, 2008: Message edited by: Anuj Kr. ]
[ January 10, 2008: Message edited by: Anuj Kr. ]