Review Questions

2.12 Which of these are valid declarations of the main() method in order to start the execution of a Java application?

Select the two correct answers.

  1. static void main(String[] args) { /* ... */ }

  2. public static int main(String[] args) { /* ... */ }

  3. public static void main(String args) { /* ... */ }

  4. final public static void main(String[] arguments) { /* ... */ }

  5. public int main(Strings[] args, int argc) { /* ... */ }

  6. static public void main(String args[]) { /* ... */ }

2.13 Which of the following are reserved keywords?

Select the three correct answers.

  1. public

  2. static

  3. void

  4. main

  5. String

  6. args

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.17.244