Rahul.p Kumar wrote: stack trace can be generated from inside catch block. Try searching Exception handling in google, if you are not aware of it.
I guess you are talking about try catch & finally blocks?
Or it may be System.out.println() about which I am aware of.
I guess stack trace is one & the same thing above, which I am aware of

?
By searching exception handeling I got the same result above

!