Win a copy of Java Challengers this week in the Java in General forum!

Vijay Tidake

Ranch Hand
+ Follow
since Nov 04, 2008
Vijay likes ...
Hibernate Tomcat Server Java
India
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
14
Received in last 30 days
0
Total given
23
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vijay Tidake

It is not about the sequence. Consider these as two different programs.
My question is if I am passing the Runnable job to class A (Thread), still it is not executing it class B.

If I dont override run in class A , both line will print B.?
5 years ago


Why above main method the first call print "A" and second is printing "B", although I am passing same job to both the thread?
5 years ago
Hi Bear,
Sorry about the misinterpretation of the question by me as my eyes skipped the part
<%
//This is where I want to use the value which is in the mobNo variable
%>
I thought he would be using the input value on the same page but not inside the jsp tags.

Thanks
9 years ago
JSP
Hi,
you can use a hidden variable on the page and once the user entered value you can set the value of this hidden variable on the same jsp page.
eg. document.getElementById('variableid').value = mobNo;

Thanks
9 years ago
JSP
Hi All,

Can anybody explain me the the code.



Thanks
9 years ago
Hi

for that you must go for the further reading on Java introspection and reflection.
Have a look at the java.beans.Introspector class.

Thanks
9 years ago
Hi,

Look for the concept of type casting.
For your eg. you can call getVar() as follows.




Thanks
9 years ago
Hi Wouter Oet,

Thanks for reminding me the rule. Onward I will follow it.

Thanks
9 years ago
Hi,

Try this.

Edit: removed complete solution.

Thanks
9 years ago
Hi,

Integer.parseInt(args[0]);



This line will throw the ArrayIndexOfBound exception if you are not passing any parameter to main or if the interger greater than months.length.

Thanks
9 years ago
Hi,

Please suggest the right way of using the constructor!!I m not just getting as to hw it works!!



I/m not clear about your doubt.What are you trying to say?

1.How to use the constructor
2.How to write your own exception
3.How to throw an exception from try block.
4.How throw works in try catch block

Thanks
9 years ago
Hi,

What is the error?
Are you passing any non integer param to main?

Thanks
9 years ago
Hi,

Is it possible to throw an exception in try block



Its possible.
9 years ago