This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

q

 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public void divide(int a, int b) {
try {
int c = a / b;
}
catch (Exception e) {
System.out.print("Exception ");
} finally {
System.out.println("Finally");
}

Prints out: Finally
Prints out: Exception
Prints out: Exception Finally
No output

i answered 1st option, but the correct option is 3.
The 3rd option wud be correct, if b = 0.
No such condition is mentioned here.

Wht shd be the correct answer and y?
 
Joe Borderi
Ranch Hand
Posts: 151
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried to compile and run the code? Use some test cases and test the output.
 
Jay Ashar
Ranch Hand
Posts: 208
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if there is any correct answer to your question, unless you supply a value of a and b variables.
[ November 22, 2004: Message edited by: Mike Saloni ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic