Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: differences

  1. #1
    Junior Member
    Join Date
    Sep 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default differences

    what is different between void main() and public void main()


  2. #2
    Member jdv's Avatar
    Join Date
    Jul 2014
    Location
    This Land
    Posts
    73
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default Re: differences

    Quote Originally Posted by Angelo447 View Post
    what is different between void main() and public void main()
    Both are incorrect if you are referring to the single main method that any single Java app must have. The signature must be "public static void main(String[] args)" [although the modifiers can be in any order, this is the recommended convention.]

    Lesson: A Closer Look at the "Hello World!" Application (The Java™ Tutorials > Getting Started)

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: differences

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

Similar Threads

  1. hi, can any one please tell me differences between these I/O streams
    By fredsilvester93 in forum Java Theory & Questions
    Replies: 3
    Last Post: July 31st, 2012, 08:58 AM
  2. what is differences between the methods next() and nextLine()?
    By tuanvu_n in forum Java Theory & Questions
    Replies: 2
    Last Post: April 15th, 2011, 10:47 AM
  3. Difference between input.next and findInLine(".")charat(0)
    By lotus in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: July 6th, 2009, 05:10 AM
  4. Differences Between Java and C,C++
    By sriraj.kundan in forum Java Theory & Questions
    Replies: 2
    Last Post: June 20th, 2009, 01:11 PM