Hi,
what's wrong with my solution? Output seems to be the same.
Kind Regards
package com.codegym.task.task09.task0906;
/*
Logging stack traces
*/
public class Solution {
public static void main(String[] args) {
log("In main method");
}
public static void log(String s) {
System.out.print(Thread.currentThread().getStackTrace()[1].getClassName());
System.out.print(": ");
System.out.print(Thread.currentThread().getStackTrace()[2].getMethodName());
System.out.print(": ");
System.out.print(s);
}
}