aspose file tools*
The moose likes Beginning Java and the fly likes Could someone tell me where to find the information for this question? 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 » Java » Beginning Java
Bookmark "Could someone tell me where to find the information for this question?" Watch "Could someone tell me where to find the information for this question?" New topic
Author

Could someone tell me where to find the information for this question?

kenny gill
Ranch Hand

Joined: Mar 12, 2012
Posts: 54

The question I'm being asked:

I do not want to look at documentation to see if the methods I use cause exceptions. If there is a problem, there are two distinct ways that Java will let me know. What are they?
Ishan Pandya
Ranch Hand

Joined: Feb 06, 2012
Posts: 213

I guess they are "catch" and "throws".


OCPJP
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36453
    
  15
You do need to look at the documentation, which should tell you. Look at this constructor and this method, for example. Note the unchecked Exception in one case appears only in the Javadoc and the checked Exception in the other case appears as a throws clause, too.
Note that unexpected unchecked Exceptions might not be listed at all; if you pass 0 and suffer an ArirthmeticException, that might not be anticipated or recorded.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Could someone tell me where to find the information for this question?
 
Similar Threads
tricky for loop
Doubt in Sun's 1.4 Practice xam
Seam - lurning curve
Properties file
Collection Question for SCJP