jon.kiparsky's Profile User Rating: ****-

Reputation: 7744 Deity
Group:
Moderators
Active Posts:
13,138 (10.27 per day)
Joined:
19-March 11
Profile Views:
102,564
Last Active:
User is online 14 minutes ago
Currently:
Viewing Topic: Code not printing string literal

Previous Fields

Country:
US
OS Preference:
Mac
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Expert In:
Java, python, smartassery

Latest Visitors

Icon   jon.kiparsky lowlands timberlands badlands birdlands

Posts I've Made

  1. In Topic: Code not printing string literal

    Posted 18 Sep 2014

    Glad I could help.
  2. In Topic: Code not printing string literal

    Posted 18 Sep 2014

    Because "row 1 \n" is the literal string composed of those 7 characters ('\n' is a single character, of course)

    You want to concatenate the String pointed to by the variable row1 to a newline character - or, better, to use the println method, which adds the newline for you.

    Like so:

    System.out.println(row1);
    



    EDIT - oh, I see. You can't use println? Then use concatenation:

    System.out.print(row1+"\n");
    


    or else

    String newline = "\n";
    System.out.print(row1 + newline);
    


    since it's usually a good idea to name your literals.
  3. In Topic: Mechanical Keyboards

    Posted 18 Sep 2014

    It's a DataHand
  4. In Topic: Order of initialisation.

    Posted 17 Sep 2014

    The class definition defines a bunch of statements which define entities (fields and methods). Those are evaluated in sequence as the definition is read. If a line creates a field, and that field is an object, it has to be created - that means its constructor is called and run. The method that constructs a House object is also defined there, as the second line of the class, but that method doesn't run until it's called, which happens later on. (this is why the Window(33) call happens last, even though it appears second in sequence in the file)

    As an experiment, you might want to add this:

    class Floor {
        Floor() { System.out.println("Floor");}
        Window fw1 = new Window (45);
    }
    


    Don't add any references to it, just add the definition. Do you expect to see the call to the window constructor with an argument of 45? Why or why not?
  5. In Topic: Java Interface Question?

    Posted 17 Sep 2014

    View Postsincara, on 17 September 2014 - 07:21 PM, said:

    What is the correct way to implement the getCalls() method?



    That depends. What is is supposed to do?

My Information

Member Title:
Pancakes!
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Boston, MA
Interests:
Translation (Portuguese, German, Spanish), accordion (Hohner Black Dot B/C), flute (Casey Burns, Skip Healy 3-piece), homebrew (beers and meads)
Full Name:
Jon Kiparsky
Programming Languages:
Java, python, scala, perl, c, various lispen, bits and pieces of this and that

Contact Information

E-mail:
Private

Comments

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  1. Photo

    rossypz Icon

    15 Aug 2014 - 01:46
    Hi,I Am Mrs Rose.I am writing to know you more for i have an important issue to discuss with you. for more details write me on This Email: rosse4u2006@hotmail.com wrte to my email..
    God bless.
    Roseline
  2. Photo

    BenignDesign Icon

    07 Aug 2014 - 10:36
    Very entertaining site you posted there. :)
  3. Photo

    BenignDesign Icon

    04 Aug 2014 - 08:48
    Damn! I would have loved to go, but we were on vacation in Virginia! Keep me posted if you know they're coming back in the future!
  4. Photo

    jedii Icon

    20 May 2014 - 02:32
    hey i wondering if you help me with my python project really need help am willing to pay
  5. Photo

    PythonPanda Icon

    23 Apr 2014 - 10:50
    Great help!
  6. Photo

    helpheimer Icon

    18 Apr 2014 - 00:12
    prevented my noob brain from melting multiple times :)
  7. Photo

    Preacher2012 Icon

    30 Mar 2014 - 16:32
    you give great help, mind help me with my cipher lab?
  8. Photo

    yashwanth.c.b Icon

    02 Mar 2014 - 00:20
    wow....jon thank you...i am happy thar i've got reps from you.... :)
  9. Photo

    BenignDesign Icon

    23 Dec 2013 - 22:32
    Rawr. I love it when you talk nerdy.
  10. Photo

    BenignDesign Icon

    23 Dec 2013 - 08:54
    And what's wrong with library cred? A well read man is a sexy man.
  11. Photo

    BenignDesign Icon

    18 Dec 2013 - 13:35
    Gotta maintain that computer geek street cred.
  12. Photo

    BenignDesign Icon

    18 Dec 2013 - 13:11
    Your theme song is both hysterical and sad. I doubt the truth in it, but I get the point.
  13. Photo

    modi123_1 Icon

    26 Nov 2013 - 07:35
    http://motherfuckingwebsite.com/ -> a new project of yours?
  14. Photo

    modi123_1 Icon

    13 Nov 2013 - 12:03
    Heh - waves are fun. http://imgur.com/gallery/5SupAbL
  15. Photo

    BenignDesign Icon

    27 Aug 2013 - 12:01
    Naked ladies always dig the accordion player.
  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »