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 5 of 5

Thread: hello

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    4
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default hello

    class Hello
    {
    public static void main(String args[])
    {
    System.out.println("hi,i am a beginner..hope i will learn a lot from you all");
    }

  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: hello

    Lesson 1: Put [code=java] before your code and [/code] after the end of your code for the pretty colors:

    package greetings;
     
    public class Welcome {
     
       public static void main(String[] args) {
     
          System.out.println("Welcome " + getNameOfOriginalPoster() + "!");
       }
     
       private String getNameOfOriginalPoster() {
     
          //Omitted code to get name!
          return "nayeemohamed"; //cheating!!
       }
     
    }
    Output:
    Welcome nayeemohamed!

  3. #3
    Junior Member
    Join Date
    Aug 2012
    Posts
    4
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: hello

    thank you..will not repeat the mistake.

  4. #4
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: hello

    It is no mistake to have not been informed. Welcome amigo. This is a fun place

  5. #5
    Junior Member
    Join Date
    Aug 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: hello

    Hi, coding style... Liked it. Welcome