php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why we are passing IndexOutOfBoundsException ex in catch?we have not ex.any Method or
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
Here in code
catch(IndexOutOf BoundsException ex){
System.out.println(“you forget the passing parameters”);
}
we have method catch having the parameter of class IndexOutOfBoundsException ex, here ex is an identifier (or instance of the object)of IndexOutOfBoundsException.
Every object of class has Private ,public, protected parts which can be access public or protected parts with the help of identifier like ex, but in the above method, we are not using the ex to access the any part of object or instance of the class IndexOutOfBoundsException.like ex . anyMethod(getter or setter or other method of the class)
Then if I donot use ex to access any part with help of “.” , then why passing temporary object as a parameter? Why we need it ? where its role in the code?
Reply


Messages In This Thread
Why we are passing IndexOutOfBoundsException ex in catch?we have not ex.any Method or - by saneha - 04-24-2011, 09:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  what is the difference between Static method and the method we write in Clas saneha 1 4,820 04-28-2011, 09:12 PM
Last Post: Vuhelper
  Why getCountStudent() method is called using Class Name instead of first making new saneha 1 5,959 04-28-2011, 09:10 PM
Last Post: Vuhelper
  flush method in java 2011 saneha 1 2,986 04-24-2011, 09:49 PM
Last Post: Vuhelper
  try, catch and finally block? saneha 0 2,042 04-24-2011, 07:26 PM
Last Post: saneha

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support