Help coderanch get a
new server
by contributing to the fundraiser

Kalona Ark

Greenhorn
+ Follow
since Oct 31, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kalona Ark

Thank you soooo much. I was getting a major headache trying to figure this one out. I would have never thought of that.

Thanks to everyone else who have helped too.
[ December 12, 2007: Message edited by: Kalona Ark ]
16 years ago


I have 5 lines of text saved in "input.txt". I want it to have all 5 lines to show in the "output.txt".
[ December 12, 2007: Message edited by: Kalona Ark ]
16 years ago
I have a problem with the PrintWriter class. I am trying to get it to create an new file that has more than just the last line of the existing file. I want it to print all the lines from an existing file.


[ December 12, 2007: Message edited by: Kalona Ark ]
16 years ago
Thanks for the advice.
16 years ago
  • I am having trouble with the following: use the StringBuffer class to create an object

  • read the text text from the file named "input.txt" and storing the contents in the StringBuffer object
    [ December 09, 2007: Message edited by: Kalona Ark ]
    [ December 09, 2007: Message edited by: Kalona Ark ]
    16 years ago
    Thanks to everyone that helped me. I finally got it.
    16 years ago
    I am having a lot of trouble calling the methods for countCharacter() method (which is suppose to count all characters)and concateLines() method (which is to put the array of string on one line). I have searched the internet and continue to search, but I can not understand I have to do in order to get it to work.


    [ November 24, 2007: Message edited by: Kalona Ark ]
    16 years ago
    When I tried to get the output I get this error: <identifier> expected

    I used this to get the output.
    16 years ago
    I am trying to write a method that will concate all the strings in this array called String[] s.



    16 years ago
    Is this any better. I am trying to understand, but it is just not clicking.

    16 years ago
    Lin.java:11: ';' expected
    return String line;
    ^
    Lin.java:11: not a statement
    return String line;
    ^
    Lin.java:12: reached end of file while parsing
    }

    I honesly do not know what I done wrong. I am really bad at methods. No matter how much I read and/or study methods, I can never understand them.

    I tried to re-write it as a practice. This one got no errors.

    16 years ago
    I am concatenating this:

    I need to have this text all in one line.

    [ November 23, 2007: Message edited by: Kalona Ark ]
    16 years ago
    What am I doing wrong.

    public static int concateLines(Stringline){
    return Stringline;
    {
    I probably did this completely wrong.
    16 years ago
    Thanks for the info, Bill.

    Fred,

    "Boolean class method which takes one character of a line as a parameter."



    That is what my Instructor wanted, but I did not understand the concept of a boolean class method.
    [ November 20, 2007: Message edited by: Kalona Ark ]
    16 years ago
    Can someone please explain or provide links so I can understand how to construct a boolean class method?
    16 years ago