My doubt is on call stack and stack trace in java.
Call stack: “The call stack is an internal list of all the methods that are currently executing.”
Stack trace: ”It is a list of all all the methods in call stack.”
According to above definitions Stacktrace contains list of all the methods in call stack.
Then what is the difference between call stack and stack trace?
Please explain the difference.
They're more or less the same thing. If I had to make a distinction, I would consider the call stack to be the abstract idea of the current stack of methods being called, and/or the JVM's internal representation of that abstraction; and I'd consider the stack trace to be a textual representation of the call stack, for humans to use for debugging.