IT Community - Software Programming, Web Development and Technical Support

Can main method be declared final?

This is a discussion on Can main method be declared final? within the Java Programming forums, part of the Software Development category; pls anyone tell me Can main method be declared final in java.........


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Java Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 08-27-2007, 05:46 AM
leoraja8 leoraja8 is offline
D-Web Sr.Programmer
 
Join Date: May 2007
Posts: 194
leoraja8 is on a distinguished road
Post Can main method be declared final?

pls anyone tell me Can main method be declared final in java......
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-28-2007, 01:24 AM
ragavraj ragavraj is offline
D-Web Programmer
 
Join Date: Feb 2007
Posts: 92
ragavraj is on a distinguished road
Default Re: Can main method be declared final?

Hi

Yes, the main method can be declared final, pls try this code

PHP Code:
class example
{
  public static final 
void main(String args[])
  {
    
System.out.println("Testing");
  }

Thanks
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Final methods ragavraj PHP Programming 1 12-06-2007 06:35 AM
whats the use of final method amansundar Java Programming 4 09-14-2007 03:09 AM
Main method vigneshgets C# Programming 2 08-16-2007 11:06 PM
How to write a Java Application without a main method? mobilegeek Java Programming 1 07-24-2007 06:49 AM
Difference between static and final in java leoraja8 Java Programming 2 07-20-2007 06:46 AM


All times are GMT -7. The time now is 10:51 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0