Page 2 of 2 FirstFirst 12
Results 21 to 22 of 22
  1. #21
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  2. #22
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Smile various notes

    Still waking up, thought I would practice on you for a moment....
    ....
    Quote Originally Posted by dietgal View Post
    Yes, I do note that copyarray overwrites instead of insert. But I am still thinking (and searching) how to insert.
    In general, you will need to have a second place to put things. In place reversal still has to have a temp place to put things. Builds skills and is useful in some types of datasets. The only way to do it totally in place is super trick for later.
    Quote Originally Posted by dietgal View Post
    Sadly, in this assignment, we are not allowed to use StringBuffer.
    Not a big deal, see Cay S. Horstmann's work and or study "Collections" as often these proven tools have methods available that will do the work for you a'la OO.
    Quote Originally Posted by dietgal View Post
    Then how do I get back the new string? Do I create another string to contain the one with the changes?
    Do everything in main() ... maybe write files or something. You can print to console from main, this is usually what is done for first work to avoid some nasty file issues.
    Quote Originally Posted by dietgal View Post
    So I need to create a method called reverse is it? I am not too sure about this, as I goggled it.
    Keep studying, consider the problem. This is one place where OO has it's proper place as you just write a method as a short mental note and continue working. This encapsulates various areas of work.
    Quote Originally Posted by dietgal View Post
    This is provided in the skeleton provided for us.
    Yes, various reasons. In general, we work from a copy + not the original: This is called copy semantics. That would likely be the intent there.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Help with Arrays
    By bri1547 in forum New To Java
    Replies: 4
    Last Post: 08-01-2008, 06:12 AM
  2. arrays
    By hasysf in forum New To Java
    Replies: 12
    Last Post: 07-28-2008, 03:38 AM
  3. Help on Arrays...
    By cuellar14 in forum New To Java
    Replies: 4
    Last Post: 07-25-2008, 09:16 PM
  4. need help with arrays
    By Jman in forum New To Java
    Replies: 17
    Last Post: 07-21-2008, 03:34 AM
  5. 2D-Arrays
    By kbyrne in forum New To Java
    Replies: 1
    Last Post: 02-07-2008, 11:08 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
  •