aspose file tools*
The moose likes Beginning Java and the fly likes Program Logic. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Program Logic." Watch "Program Logic." New topic
Author

Program Logic.

Phillipe Rodrigues
Ranch Hand

Joined: Oct 30, 2007
Posts: 165
What is this program trying to do?



Thanks,
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11475
    
  16

looks to me like it's creating an object, using that to create a second one, and then printing it out.

what do YOU think it's doing?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19759
    
  20

You may be thrown off because Exceptions extends Exception, but since you are not throwing any exceptions you can consider them to be just simple objects.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 375
Let me have a go..

You are creating a new type of Exception and then "returning" that Exception (which is also throwable) from a method.

If you modify your program like so..

You could trace the call to the method e. So I think this might be one way of to determine how a certain method/constructor gets called in the execution of a program without exiting the normal flow of the program.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Program Logic.