File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Is a RuntimeException "Output"? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Is a RuntimeException "Output"?" Watch "Is a RuntimeException "Output"?" New topic

Is a RuntimeException "Output"?

Steve Norris

Joined: Feb 22, 2013
Posts: 4

Is a RuntimeException considered to be output? If a main method throws an IllegalArgumentException, would it be correct to say that it ran without output or that IllegalArgumentException was included in the output? Also, do Errors work the same way?

Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 29219

It's not considered output. By output, the exam means printlns. There will be a separate answer choice about exceptions.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Steve Norris

Joined: Feb 22, 2013
Posts: 4
Thanks for the answer. I wasn't sure since two explanations in the same practice exam treated them in opposite ways.
I agree. Here's the link:
subject: Is a RuntimeException "Output"?
Similar Threads
AWT - Summary
Exception Doubt
Parsing Problem
CodeGenerator code refactoring