This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Fill in the blank  RSS feed

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In an Java application program, what are the appropriate modifiers and return types for the main method declaration ? Write down the keywords in the correct order, choosing the following keyword list.
private protected public abstract static boolean void synchronized final Object native transient
The answer is public static void main(String[] args), though String[] args not in the above list. How Exam consider this answer ?.
In case if we say public static void main(String args[]), will the Exam consider this one is correct ?
 
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you copied the question correctly, it doesn't ask about argument list, only about return type and access modifier. So the answer is <CODE>public static void main</CODE> OR <CODE>static public void main</CODE>.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes...Tony, I copied exact and surprised to see Bill Brogden includes String[] args in his answer.
Again....
Hoping that Exam will consider both public static void main and static public void main as correct answer.
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brogden corrected that a long time ago. It is in his errata Web page. It is critical to get the errata for tech books. Brogden is very good at maintaining one.
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CORRECTION TO MY POST ABOVE:
The correct answer is
<CODE>public static void</CODE>
OR
<CODE>static public void</CODE>
main is not in the given list.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!