Sir is program me try block ke andar 2 exception thi interrupted and arithmetic exception interrupted ko Throw kr catch ko diya catch ne solve kiya .....kya iske baad Arithmetic exception ko Dobara se solve kiya gaya yaa use ignorred kiya gaya yahi doubts hai sir ?.....
Sir plz reply mujhe ye samaj nahi aaya ki jab Thread.sleep(1000) likha tha aur program correct tha to ye interrupted exception kyu aaya aapne program ka aim tha 1 to 10 print ho 1 second ke aantaral me Aur interrupted exception ka matlab kya hota hain * aur sir aapne first program me Thread classs ka sleep method use Kiya vo to ekdam correct tha to exception aaya hi kyu **** Thodi aasan bhasha me samjaye sir Plz reply sir meri exam pas hain sir
Thank you sir very nice gide & very nice best information try catch and throws block exception in java teaching video.👍
that's a really nice analysis video 👍
11:44 lakin sir agar hamko loop ka output chaiye toh fir toh throws ka use krne na warna trycatch me toh bas catch ko print krdega
Thanks a lot sir!!
thaank you bhai
tnx .... Your lecture was supper ... you need to be teacher for the nation
Thank you,Thank you so much
Thanks again sir
🙏
Plz make video on java collection and advance java. #learncoding
Sir aap DS. me tree and graph pr v video bna dijiye. Pls sir.....
SIR YOUR TEACHING STYLE IS VERY GOOD
SIR WHERE ARE YOU FROM
From jamshedpur and you my friend
class Thro{
public static void main(String[] args)throws ArithmeticException {
Th.m1();
}
}
class Th{
public static void m1()throws ArithmeticException{
// try{
m2(10,0);
// }
// catch(ArithmeticException e){
// System.out.println("Exception handled");
//}
}
public static void m2(int a,int b)throws ArithmeticException{
int c=a/b;
if(b==0){
throw new ArithmeticException();
}
else{
System.out.println(c);
}
}
}
How to handle the above code without using try-catch block ??
simple...use throw keyword but best approach Is try-catch
Ol
Bhai mai apka sabhi video dekhta hu
Aur first comment bhee karta hu but aaap javab kyu nahi dete
bro plz one request 🙏 😔 I have a exam plzz tell about attribute nd also about what is key nd types of key plzz bro 🙏
can we give like this in main declaration
throws InterrruptedException, ArithmeticException
Yes, you can.
In this playlist all types of exception like InterruptedException 👇👇👇
th-cam.com/play/PLqleLpAMfxGAEfyXJyF-9UOs9C8dmir_Y.html
Sir is program me try block ke andar 2 exception thi interrupted and arithmetic exception interrupted ko Throw kr catch ko diya catch ne solve kiya .....kya iske baad Arithmetic exception ko Dobara se solve kiya gaya yaa use ignorred kiya gaya yahi doubts hai sir ?.....
Sir plz reply mujhe ye samaj nahi aaya ki jab Thread.sleep(1000) likha tha aur program correct tha to ye interrupted exception kyu aaya aapne program ka aim tha 1 to 10 print ho 1 second ke aantaral me
Aur interrupted exception ka matlab kya hota hain
* aur sir aapne first program me Thread classs ka sleep method use Kiya vo to ekdam correct tha to exception aaya hi kyu ****
Thodi aasan bhasha me samjaye sir
Plz reply sir meri exam pas hain sir
Yaha wait method ka Object kyu nhi create kiya gya. Direct usse likh kyu diya gya
क्योंकि wo static method hai
Bhai apka whatsapp number chahiye tha kuch kaam tha
🙏