#82 Ducking Exception using throws in Java

Поделиться
HTML-код
  • Опубликовано: 24 янв 2025

Комментарии • 33

  • @devwithsmile
    @devwithsmile Месяц назад +6

    This series got me job last time. And now I am here again when I want to switch , revising . Thank you so much sir for such quality content.

  • @harsh-ox9gy
    @harsh-ox9gy Год назад +17

    best java tutorial series!

  • @Maria_farah
    @Maria_farah Месяц назад +1

    he well explained professor + of that he smiles when he is explaining somethings which gives student to catch the lesson. Thank you sir

  • @ChandraSm1310
    @ChandraSm1310 2 месяца назад +1

    Every java developer must watch this exception series from Mr Naveen ,the Alien, who teaches java at root level❤😊

  • @malinigowda5586
    @malinigowda5586 11 месяцев назад +1

    best java tutorial series! Thank you so much Navin

  • @suneethamudragada
    @suneethamudragada 4 месяца назад

    Very usefull for us in this video I learned the throws very easily iam very confusing in my institution while explaining about this. They are not explained just they said keep throws keyword now I got clarity about this thank you very much .

  • @dhivyalakshmi1255
    @dhivyalakshmi1255 2 месяца назад

    Thank you its very useful to understands throws keyword

  • @ajayghode3602
    @ajayghode3602 26 дней назад

    Thank You.

  • @Rhanjag
    @Rhanjag 5 месяцев назад

    Hi Naveen, it's not thought in the series for Class.forName. Can you add a series here? It would be really helpful to us.

  • @parthisanjay3252
    @parthisanjay3252 10 месяцев назад

    public void b( ){
    try{
    c( );
    d( );
    }
    catch( ){
    }
    in the above case b( ) method called both methods c( ) and d( ) with try block. If c( ) throws exception means execution will jumps to catch block so d( ) will not execute right.
    }

    • @adarshveerabathini8550
      @adarshveerabathini8550 9 месяцев назад

      It will jump to catch block to handle the exception ...then the execution will continue and d() will also be executed

    • @parthisanjay3252
      @parthisanjay3252 9 месяцев назад

      @@adarshveerabathini8550 No bro, i tried d( ) will not execute

    • @adarshveerabathini8550
      @adarshveerabathini8550 9 месяцев назад

      If u want the d() method to be executed u need to place it in finally block

    • @adarshveerabathini8550
      @adarshveerabathini8550 9 месяцев назад

      Once an exception is raised it will directly jumps to catch block by skipping all the remaining lines so....may be it will skip d()

  • @Giri14_18
    @Giri14_18 Год назад +1

    sir the lectures are just awesome .
    sir are you from south india ? telugu states ?

  • @jayanthipenugonda7274
    @jayanthipenugonda7274 Год назад +1

    I remember that Class.forName was seen previously in one of the videos of this series. If anyone knows please tell me.

    • @virendersinghnegi5009
      @virendersinghnegi5009 6 месяцев назад

      I don't think so he taught us this in the past.

    • @tusharburman2831
      @tusharburman2831 5 месяцев назад +1

      no i guess class,forName he didnt taught us in the past videos

  • @mdmusharraf7045
    @mdmusharraf7045 4 месяца назад +2

    come here after wasting 1 hr in paid batch . Nice explanation 🧡💛💛

  • @bipinkori4060
    @bipinkori4060 Год назад

    My main method throws AgeNotFoundException and JVM returns the error.
    why this soo??

  • @bipinkori4060
    @bipinkori4060 Год назад +4

    package ExceptionPractise;
    public class Voting {
    public static void vote(int age) throws AgeNotFoundException {
    if(age>18){
    System.out.println("Eligible for voting");
    }
    else
    throw new AgeNotFoundException("Not elegible");
    }

    public static void main(String[] args) throws AgeNotFoundException{
    vote(10);
    }//Main ends here
    }//class ends here

  • @jackfrost8969
    @jackfrost8969 6 месяцев назад +1

    you have not taught static {} code up until now

  • @kochi_02_abhinavtongale73
    @kochi_02_abhinavtongale73 2 года назад +1

    👍👍👍👍

  • @LifeAt1004_
    @LifeAt1004_ 5 месяцев назад

    Can Someone tell what is wrong with my code
    public class ThrowsKeyword {
    public static void show () throws ClassNotFoundException( ) {
    Class.forName(ThrowKeyword);
    }
    public static void main(String[] args) {

    try {show();}
    catch(ClassNotFoundException ce){
    System.out.println("Class not found");
    }
    }
    }

    • @dudisaicharan
      @dudisaicharan 5 месяцев назад

      public class ThrowsKeyword {
      public static void show () throws ClassNotFoundException
      {
      Class.forName("ThrowKeyword");
      }
      public static void main(String[] args) {

      try {
      show();
      }
      catch(ClassNotFoundException ce){
      System.out.println("Class not found");
      }
      }
      }
      just small syntax error ,every thing looks fine with u.
      Error->class.forname(" ")
      throws ClassNotFoundException (its a class not a method,dont use brackets)

  • @indiandeveloper8614
    @indiandeveloper8614 Год назад +4

    In Exception you are going so fast

    • @HN-bn6vv
      @HN-bn6vv Год назад +3

      Yes, but you can adjust speed 😀

  • @Nikitaaaaa17
    @Nikitaaaaa17 5 месяцев назад

    Accenture pdf

  • @ooogabooga5111
    @ooogabooga5111 9 месяцев назад

    but this only works for checked exceptions, what if I want to force unchecked exceptions to be handled ?

  • @ManishKumar-zt5sk
    @ManishKumar-zt5sk 8 месяцев назад +2

    Taklusko