php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excpetions , Multiple Exceptions , how ??
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#2
You can throw multiple exceptions as follows

public void method() throws IOException, NullPointerException //so on you can add as many as you want or require and this will be handled in caller //function
{
String str ;// A Null point exception
//assume user don't enter any input in the field ...there will be another exception.
str =JOptionPane.showInputDialog(null, "Please enter input. ");
double dAge ;
dAge= Double.parseDouble(JoptionPane.showInputDialog(null, "Please enter your age. "))//assume user enter his age in the form of String "like twenty //instead of 20”. Here, another exception will be generated.
}

IOException can catch all type of exceptions.

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Messages In This Thread
Excpetions , Multiple Exceptions , how ?? - by Vuhelper - 04-24-2011, 06:55 PM

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