Search:

Type: Posts; User: connorlm3

Search: Search took 0.10 seconds.

  1. Replies
    14
    Views
    1,332

    Re: Help with file I/O scanning etc

    Ok, thank you very much for your help, I can now get the number with the strategy you have helped me with, I've got it converting to an int also that i can add to a running total.
  2. Replies
    14
    Views
    1,332

    Re: Help with file I/O scanning etc

    when i print the string there, the output gives me this [Mary, F, 1234]


    if (nextLine.contains(genName)) {

    String[] numbers =...
  3. Replies
    14
    Views
    1,332

    Re: Help with file I/O scanning etc

    Ok i see how the split method works now, if i make a string like String tosplit = new String(","); and i use it in split, it just puts spaces in the string after the commas? I dont see how that could...
  4. Replies
    14
    Views
    1,332

    Re: Help with file I/O scanning etc

    Would something like this work.


    if(nextLine.contains(genName)) {

    int length = nextLine.length();
    ...
  5. Replies
    14
    Views
    1,332

    Re: Help with file I/O scanning etc

    arrays? where are arrays coming into this? you lost me now. and ok i found the method for the string to int conversion. still confused where arrays are coming into play at.. and if i try running my...
  6. Replies
    14
    Views
    1,332

    Re: Help with file I/O scanning etc

    So in the java docs i found this

    String[] split(String regex)
    Splits this string around matches of the given regular expression.

    Trying to understand what it means, and how to...
  7. Replies
    14
    Views
    1,332

    Re: Help with file I/O scanning etc

    well how i have it set up is what im searching the file for would be like this "Mary,F" and i already have the line that contains that as a string. How does this split method work?
  8. Replies
    14
    Views
    1,332

    Help with file I/O scanning etc

    I have a program where a user enters a name and a gender, then the program is suppose to read through all these yob####.txt files to see if it contains that name,gender. if it does, i need to be able...
Results 1 to 8 of 8