Results 1 to 11 of 11

Thread: Off topic "Intro to Java Programming"

  1. #1
    All Pro
    Join Date
    Apr 2003
    Location
    Fr:NYC to Mid Ga.
    Posts
    8,837

    Off topic "Intro to Java Programming"

    Somebody please help me to refresh my memory now.

    Write, Compile, and test a class that displays the following pattern
    below in java. zip file.

    *

    * *

    * * *

    * *

    *


  2. #2
    Jets Insider VIP
    Join Date
    May 2004
    Location
    New Jersey
    Posts
    6,285
    Quick internet search found this. Shoudl be easy enough to modify

    http://www.dreamincode.net/forums/showtopic24865.htm

  3. #3
    Jets Insider VIP
    Join Date
    Nov 2004
    Location
    LI
    Posts
    20,540
    Are you asking us to do your homework?

  4. #4
    All Pro
    Join Date
    Apr 2003
    Location
    Fr:NYC to Mid Ga.
    Posts
    8,837
    Quote Originally Posted by quantum View Post
    Are you asking us to do your homework?
    attention whore!

  5. #5
    Hall Of Fame
    Join Date
    Jan 2006
    Location
    Rochester, NY
    Posts
    13,858
    My Braylon Edwards thread ends up in the dump... now this...

  6. #6
    Quote Originally Posted by TechJet View Post
    Somebody please help me to refresh my memory now.

    Write, Compile, and test a class that displays the following pattern
    below in java. zip file.

    *

    * *

    * * *

    * *

    *

    NotVeryTechJet

  7. #7
    Jets Insider VIP
    Join Date
    Nov 2004
    Location
    LI
    Posts
    20,540
    Quote Originally Posted by K-Met57 View Post
    NotVeryTechJet
    lol - zing!

  8. #8
    Simple,

    I used to be a java developer but now doing C# but I'll take a stab.

    class GetPattern {
    public static string ReturnPattern(){
    private string pattern = "*\n\n* *\n\n* * *\n\n* *\n\n*";
    return pattern;
    }
    }

    Done. Compile it. Then all you have to do to use it is write a console application to include the GetPattern class and execute it from the main method:

    include GetPattern;

    class RunPattern {
    public static void main(string args[]){
    Console.Write(GetPattern.ReturnPattern());
    }
    }

  9. #9
    Jets Insider VIP
    Join Date
    Sep 2005
    Location
    NC
    Posts
    18,566
    Quote Originally Posted by southside View Post
    Simple,

    I used to be a java developer but now doing C# but I'll take a stab.

    class GetPattern {
    public static string ReturnPattern(){
    private string pattern = "*\n\n* *\n\n* * *\n\n* *\n\n*";
    return pattern;
    }
    }

    Done. Compile it. Then all you have to do to use it is write a console application to include the GetPattern class and execute it from the main method:

    include GetPattern;

    class RunPattern {
    public static void main(string args[]){
    Console.Write(GetPattern.ReturnPattern());
    }
    }

    Oy Veh..........

  10. #10
    Hall Of Fame
    Join Date
    Sep 2005
    Location
    Oceanside, Long Island
    Posts
    10,788
    ( | ) ( / ) ( | ) ( \ ) ( | )

    Shake that booty

  11. #11
    Schluberator & Gadfly
    Join Date
    Mar 2005
    Location
    Virginia
    Posts
    26,522
    Please don't post OT threads in the Landing Strip. That's viewed as spamming and is a bannable offense.

Bookmarks

Posting Permissions

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

Follow Us