Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Eccouncil Exam 312-96 Topic 1 Question 42 Discussion

Actual exam question for Eccouncil's 312-96 exam
Question #: 42
Topic #: 1
[All 312-96 Questions]

Which of the following method will you use in place of ex.printStackTrace() method to avoid printing stack trace on error?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Kathrine
3 days ago
Definitely C) ex.getMessage(); keeps things clean and avoids the stack trace clutter.
upvoted 0 times
...
Annamaria
8 days ago
I'm not sure, but I think D) ex.getError() might also work
upvoted 0 times
...
Rima
11 days ago
I like C) ex.getMessage(); it's simple and gets the job done.
upvoted 0 times
...
Sharee
13 days ago
C) ex.getMessage(); is the way to go, nice and straightforward.
upvoted 0 times
Lina
17 hours ago
I agree, ex.getMessage() is much cleaner than ex.printStackTrace().
upvoted 0 times
...
...
Georgene
15 days ago
I agree with Sheldon, using ex.getMessage() will avoid printing the stack trace
upvoted 0 times
...
Sheldon
18 days ago
I think the answer is C) ex.getMessage()
upvoted 0 times
...

Save Cancel