#5 Mastering the Java Main Method Command Line Basics

Pubblicato il: 07 dicembre 2024
sul canale di: JAVA CLASSES BY RASHMI SIR
9
1

Now see I just show you Now here you check I just write here there is a pine public here you see class there it is x is a class Inside that I just write here there it is public static there it is void Maine Once I pass here I just write a string a-r-g-s You know that that is the that is word I'm just enter into word that is called as word that is the main method Within that I just write int x is equal to 100 I pass Int y is equal to that is args dot length I pass here You know that uh what is the meaning of args dot length That is the length of the command line argument Now what I can do here if I write here that is within the try block because uh you know the concept That is if that is what args length is 0 I am not passing a command line argument then my program must be terminated because when I divide a number by 0 then it generates exception So I am using the try block I just write here that is system out printalign I just write here that is result is Here you see the result is I just write x by y Anyway I just write But you know the concept uh this dry block may generate exception When it generate exception what type of exception may generate uh that is here you see catch Which exception may generate Arithmetic There is a exception here you see Arithmetic exception A That is the catch block You see if exception arise then catch block executed If exception not arise catch block never be executed You know the concept


In questa pagina del sito puoi guardare il video online #5 Mastering the Java Main Method Command Line Basics della durata di ore minuti seconda in buona qualità , che l'utente ha caricato JAVA CLASSES BY RASHMI SIR 07 dicembre 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 9 volte e gli è piaciuto 1 spettatori. Buona visione!