Sunday, 1 November 2020

If string args[] is not written in main() method .

 

 

If  string  args[]  is not written  in main( ) method .



When main( )   method  is written  without  Sring args[] as :

       public static void main ( )

 

The code  will  compile  but  JVM   cannot  run  the code  because  it cannot  recognize  the  main ( )   as the method from  where  it should start  execution  of the  Java  program .

 

Remember  JVM always  looks for  main ( )  method  with  string  type  array  as parameter .

 

 

 

        Thank you 💖

 

1 comment:

Student Marks Calculation app using java

      import javax.swing. *; import java.awt.event.ActionEvent ; import java.awt.event.ActionListener ; public class Student { private J...