السلام عليكم
هي كود جافا
public static void throwit() {
throw new RuntimeException();
}
public static void main(String[] args) {
try {
System.out.println("Hello World");
throwit();
System.out.println("Donw with try block");
}
finally {
System.out.println("finally executing");
}
}
}
public class MyProgram {المطلوب هو خرج البرنامج
منطقيا استنتجت أنه سيتم طباعة Hello world ثم Exception ثم finally executing و لكن بعد التنفيذ وجدت الخرج
Hello World ثم finally executing و أخيرا ظهرت رسالة الـ exception
ممكن تفسير منطقي للخرج ......
وشكرا
