You can do this in another way (more understandable btw 😁) throw new InvalidAgeException("Not eligible for voting"); //or InvalidAgeException obj=new InvalidAgeException("Not eligible for voting"); // making the obj naam ka object throw obj; // then throwing it.
Bhai mai kha kha nhi bhatka user defined Exception code samajhne but kahi samajh hi nhi a rha tha par yaha par a to z samajh a gya 😂😂 Thankyou learn coding
1) After using throw keyword is it necessary to use throws? 2)if invalidageexception is created using throw keyword then why we need to create the same name class and constructor?
creating another class for receiving object InvalidAgeException("not eligible for voting") and declaring InvalidAgeExxception means we are telling complier that exception invalidageexception will be going to occur so catch (Exception e){ sysout(e)} will print the name of error which is invalidageexception
Best video on user defined exception... Thanku sir 😊
Agar kisine poocha ki Java sikhaneka Bhaghavan kidar hai? Tho mai Bilkul bolunga ki "Learn Coding" me hai.
Shi kha
😮
yes
Thank you sir very nice gide & very nice best information user defined exception teaching video.👍
excellent video ma sha Allah
what an explanation much better then paid courses❤❤
really sir you are helping me a lot thakyou!
You can do this in another way (more understandable btw 😁)
throw new InvalidAgeException("Not eligible for voting");
//or
InvalidAgeException obj=new InvalidAgeException("Not eligible for voting"); // making the obj naam ka object
throw obj; // then throwing it.
pura code to de na bhai
Thank Youu
Bhai mai kha kha nhi bhatka user defined Exception code samajhne but kahi samajh hi nhi a rha tha par yaha par a to z samajh a gya 😂😂
Thankyou learn coding
Your explanation is too good sir 😊
What a explain ❤️❤️
nice work buddy😊😊👌👌👌👌
All your vdos are awesome sir
Very good program 💯
Sir i am watching this video before 4 hours of my semester exam and i hope i will get out of marks in exception
Thank you sirji❤
Mere taraf se apke liye radhe radhe ❤
Right 👍
thanks for the knowledge
Very nice
Very helpful
Nice explanation ❤️🎉
Fantastic Explanation
Thnaks❤
Sir, one error is coming here (cannot find symbol) what to do now ??
Thank you so much sir
Thanks sir🙏🙏
next level video
thank you sir ......
thanks alot
congratulations sir for 1M
bro nice work😊
U r explanation very well but plese chage font type i mean chage the words size it's easy to understood
🙏🙏🙏
Thank you sir ❤️
Hello Sir, extends Exception ke liye koi parent class program likhna padgea ya nehi.? kyunki Exception ka subclass toh likha gaya he..
please add parameter to the vote method in line 13
❤
sir please reply can i handle unchecked exception with the help of throws keyword . please reply you hand led ae in previous video
yes we can. unchecked exceptions are predefined exceptions in Java and they can be handled using throws keyword.
😇
I don't understand sir in this program or maine laptop me bhi try kia but erro show hua
Sir can you please tell me which application you used to record you computer screen.
Flashback screen recorder 👇👇👇
th-cam.com/video/owndSMo_5c0/w-d-xo.html
@@LearnCodingOfficial sahi hai sir isme me ek view 🤘🏻😄
1) After using throw keyword is it necessary to use throws? 2)if invalidageexception is created using throw keyword then why we need to create the same name class and constructor?
But what is the use of creating another class and declaring InvalidageException ,cld u pls explain?
creating another class for receiving object InvalidAgeException("not eligible for voting") and declaring InvalidAgeExxception means we are telling complier that exception invalidageexception will be going to occur so catch (Exception e){ sysout(e)} will print the name of error which is invalidageexception
Sir why here using throws key word can you explian
Sir java code ki profile kese banaye using command line
sir super class Exception is not working in my laptop it showing error when i typed only ....like (Exception e)
what to do??
I think ur laptop is not working properly .. Throw your laptop by using throw keyword
Extends exception class
Is it applicable to c++ also ?
Yes
Can't find main (String[]) method in class : invalidageexception .
Check your program carefully, may be something went wrong you did
@@LearnCodingOfficial it compiled correctly , I even matched with your code,
echo"thank you";
Sir built in exceptions upload please sir
Easy explanation
Sor aaj Kam sa mj aaya hai😢😢😊
sir please provide your notes
12:26
Can you please help me out,
notes??
Sir kya ap advanced Java padhaye kya??
Bhai mai roj comment karta hu but aap javab kyu nahi dedte
Yes, bolo apna questions
Bhai apse baat karna tha whatsapp pe baat hogi ya instagram pe
I'd batao
Brother mai na hi whatsapp aur na hi insta use krta hu
Bhai ye batao apna video kaise shoot karte ho
Copy me likhke
Bhai video upload katne ka time kya hai
Sir plz reply
Yes ask your questions
Sir plz reply 🙏
Yes, ask your questions