🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Java Introduction: all 10 questions

Quiz: Java Introduction · Question 7 of 10

Which method does the JVM look for to start a program?

Which method does the JVM look for to start a program?

  1. A.public void main()
  2. B.static int main(String args)
  3. C.public static void start(String[] args)
  4. D.public static void main(String[] args)
Answer & explanation

Correct answer: public static void main(String[] args)

The entry point must be public, static, return void and take a String array.

Can you get the rest right without peeking?

Take the timed Quiz: Java Introduction quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →