answersLogoWhite

0


he message and the stacktrace are two distinct pieces of information. While the stackstrace is mandatory, the message isnt. Most exceptions deliver a message, and it is the best practice, but some just don't and there's nothing to be done to fix it.

public

void

process

()

{

try

{

System

.

out

.

println

(

"test"

);

}

catch

(

Exception

e

)

{

e

.

printStackTrace

();

}

}

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

RossRoss
Every question is just a happy little opportunity.
Chat with Ross
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao

Add your answer:

Earn +20 pts
Q: What is the meaning of printstacktrace in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp