Results 1 to 2 of 2

Thread: Java Challenges

  1. #1
    [RaIdEn] is offline Senior Member
    Join Date
    Oct 2009
    Location
    California,US
    Posts
    201
    Rep Power
    5

    Default Java Challenges

    Hey guys,

    I wanted to make a thread that would be fun to people who are learning java.

    Rules: If you answer the question, Try your best to make a new one to continue the thread. :)

    Here is my first question.

    Java Code:
    public class Hello
    {
    
       public static void main(String [] args)
        {
           System.out.println("Hi there!");
    
       }
    }
    Here, the output is amazingly easy to determine.

    Output = "Hi there"

    Question: Try printing the line "Hi there! Welcome to Java Challenges!" without changing the main method. You cannot add new methods or strings in the method.(You have full freedom to change the code as it pleases have additional methods or variables or comment out anything.{a hint}) How do you do this?

    P.S.: I am in no way a perfect java programmer but i definitely seek new knowledge. Thought it would be a fun way to learn new knowledge.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default Re: Java Challenges

    We already have a long running thread for this.
    Quiz Time

    Closing this thread.

    db

Similar Threads

  1. Programming Challenges
    By gibsonrocker800 in forum Suggestions & Feedback
    Replies: 9
    Last Post: 05-12-2008, 02:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •