why is System.out.println(e.getStackTrace); wrong and e.printStackTrace correct????????????????????????????????
package en.codegym.task.pro.task14.task1416;

/*
Logging a stack trace (THE SOLUTION AS PER CODEGYM)
*/

public class Solution {

    public static void main(String[] args) {
        try {
            dangerousMethod();
        }
        catch(Exception e){

           e.printStackTrace();
        }

    }

    static void dangerousMethod() throws Exception {
        throw new Exception("Mu-ha-ha!");
    }
}