Results 1 to 6 of 6
Like Tree2Likes
  • 1 Post By JosAH
  • 1 Post By JosAH

Thread: Command line text output

  1. #1
    Eleeist is offline Member
    Join Date
    May 2011
    Posts
    84
    Rep Power
    0

    Default Command line text output

    Hi,

    I am developing a text based game. I need to pull long passages of text from database and display it to the user.

    Therefore, I am wondering whether String is the most efficient way of processing and displaying the data? By long passages I mean 20+ lines at one time.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,519
    Blog Entries
    7
    Rep Power
    20

    Default Re: Command line text output

    Quote Originally Posted by Eleeist View Post
    Hi,

    I am developing a text based game. I need to pull long passages of text from database and display it to the user.

    Therefore, I am wondering whether String is the most efficient way of processing and displaying the data? By long passages I mean 20+ lines at one time.
    Databases laugh about Strings with a length of 20*80 characters. Don't worry about it.

    kind regards,

    Jos
    Eleeist likes this.
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Eleeist is offline Member
    Join Date
    May 2011
    Posts
    84
    Rep Power
    0

    Default Re: Command line text output

    I know that :). My question is about Java String objects, not databases :)

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,519
    Blog Entries
    7
    Rep Power
    20

    Default Re: Command line text output

    Quote Originally Posted by Eleeist View Post
    I know that :). My question is about Java String objects, not databases :)
    Java laughs about such Strings too.

    kind regards,

    Jos
    Eleeist likes this.
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    Eleeist is offline Member
    Join Date
    May 2011
    Posts
    84
    Rep Power
    0

    Default Re: Command line text output

    Hah! Thanks :)

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,519
    Blog Entries
    7
    Rep Power
    20

    Default Re: Command line text output

    Quote Originally Posted by Eleeist View Post
    Hah! Thanks :)
    You're welcome; when you think about it: you're displaying something in your console/terminal/whatever, the console is probably also a graphics application and a single character takes up quite some bytes there; so there's no need to worry about a couple of characters or where they came from ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Enumerating command-line output in a JComboBox
    By coffeeJava in forum New To Java
    Replies: 2
    Last Post: 11-19-2011, 07:19 PM
  2. Replies: 16
    Last Post: 09-17-2011, 02:41 AM
  3. Replies: 2
    Last Post: 07-02-2010, 02:20 PM
  4. Replies: 3
    Last Post: 04-26-2010, 09:00 PM
  5. Replies: 3
    Last Post: 02-16-2009, 09:20 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
  •