Homeinterview java questions What happens when static modifier is not mentioned in the signature of main method? September 18, 2023 0 As per Java specification, main method has to be marked as static. It needs only one argument that is an array of String. A program can compile with a non-static method. But on execution it will give NoSuchMethodError. You Might Like View all
Post a Comment