Online Java Compiler By
JavaTpoint.com
import java.lang.Throwable; public class ThrowablefillInStackTraceExample { public static void main(String[] args) throws Throwable { try{ int i=4/0; }catch(Exception e){ e.printStackTrace(); throw e.fillInStackTrace(); } } }
Output