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
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 ?.....
Thank you sir very nice gide & very nice best information try catch and throws block exception in java teaching 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
that's a really nice analysis video 👍
thaank you bhai
Thanks a lot sir!!
Plz make video on java collection and advance java. #learncoding
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
Thanks again sir
Ol
🙏
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
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
tnx .... Your lecture was supper ... you need to be teacher for the nation
Thank you,Thank you so much
Bhai mai apka sabhi video dekhta hu
Aur first comment bhee karta hu but aaap javab kyu nahi dete
Yaha wait method ka Object kyu nhi create kiya gya. Direct usse likh kyu diya gya
क्योंकि wo static method hai
bro plz one request 🙏 😔 I have a exam plzz tell about attribute nd also about what is key nd types of key plzz bro 🙏
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 ?.....
can we give like this in main declaration
throws InterrruptedException, ArithmeticException
Yes, you can.
In this playlist all types of exception like InterruptedException 👇👇👇
ua-cam.com/play/PLqleLpAMfxGAEfyXJyF-9UOs9C8dmir_Y.html
Bhai apka whatsapp number chahiye tha kuch kaam tha
🙏