• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

core java

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
public static void main(String args[])


why java programmers made entry point of java program so big? and what is the used of these words in Programs?
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess you come from 'C' Language background.Each word has meaning.
public - methods canbe accessed out side of the class/package
static - need not to create instance of the class to execute
void - retuns nothing
main -entry point for application . How java would be knowing where to execute like "main method in 'C'"
String args[] - You can pass n arguments to this method.
 
Marshal
Posts: 79508
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Srinivas and thank you for a useful answer.

Harsh Garg (BTW: Is that your real name?) please don't use vague names like "core java" for your threads: please look at this FAQ.
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I guess you come from 'C' Language background.

As opposed to C++ where you have the equally long:which is actually less in keeping with what you'd expect (you think it would be static, but it has to be defined as though it's external)
 
harsh garg
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am not satisfied with these answers
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Then tell us what more you want to know.
 
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why does it matter how 'big' the starting point is? Each part has a very specific meaning, and they all make sense, once you understand them. Since it's always the same, you really never even have to type it... a good IDE will build it for you each time.

so, again, what's the problem with it being that big?
 
reply
    Bookmark Topic Watch Topic
  • New Topic