6 years ago in Introduction To Java

The expected signature of the main method is public static void main(). What happens if we make a mistake and forget to put the static keyword ?

[A] The JVM issues an error saying that main method should be declared static
[B] The compiler issues a warning saying that main method should be declared static and adds it automati
[C] The JVM successfully invokes the main method
[D] The JVM fails at runtime with NoSuchMethodError
Loading...
Next Question

Create your Digital Resume For FREE on your name's sub domain "yourname.wcard.io". Register Here!


Overall Stats

Attempted 1433
Correct 191
Incorrect 532
Viewed 710

Answers

Guest
Guest
Vonani Ndlovu - 1 year ago

a P52621kmjhnb5

Rinky - 3 years ago

compiled successfully and after running error msg came main method is not static in class please add this as public static void main (String args[])

anuj - 5 years ago

compile successfuly and no such found the main method

Shaikh Tehniyat
Shaikh Tehniyat - 1 month ago

Shaikh Tehniyat is saying The JVM successfully invokes the main method is correct answer

Aisha Bashir
Aisha Bashir - 1 month ago

Aisha Bashir from Lagos, Nigeria is saying The JVM successfully invokes the main method is correct answer

Related Questions

Java is also known as ...... stage language

  • [A] One
  • [B] Two
  • [C] Three
  • [D] Four

JIT meaning

  • [A] just in time
  • [B] java in time

Tcp/Ip is

  • [A] Two way communication
  • [B] one way communication
  • [C] none