| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Oct 2006
Location: Mayiladurai (TN)
Posts: 233
Thanks: 8 Thanked 7 Times in 5 Posts Thanks: 8
Thanked 7 Times in 5 Posts
Rep Power: 5
|
A java Program Without main() function
class Hello
{ static { System.out.println("Hello World"); System.exit(0); } } |
|
|
|
|
|
#2 (permalink) |
|
Member
Join Date: May 2007
Location: Bangalore
Posts: 37
Thanks: 1 Thanked 0 Times in 0 Posts Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 2
|
Re: A java Program Without main() function
ya it will work fine but if you remove System.exit(0) then it will give an error for a main method......
__________________
Thanks & Regards, Deepesh The Language of Friendship is not Words but Meanings.... |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| JAVA WEB SITES | yathish | JAVA Technologies | 2 | 20-11-08 12:11 AM |
| Practice Question in JAVA | sowmya571 | JAVA Technologies | 8 | 15-02-08 08:09 PM |
| TCS Pacement paper 29 | sridhar | TCS Placement Papers | 0 | 12-02-07 05:43 PM |
| C language - Is it possible to execute code even after the program exits the main() function? | GEEK | ds. c , c++ Interview / Technical Questions | 0 | 23-01-07 01:19 PM |
| C language - Is it possible to execute code even after the program exits the main() function? | GEEK | ds. c , c++ Interview / Technical Questions | 0 | 23-01-07 01:18 PM |