Search:

Type: Posts; User: Noob_Programmer

Search: Search took 0.21 seconds.

  1. Replies
    3
    Views
    659

    Re: Finding String in ArrayList

    I assume and Object is something that would be in another Array? such as Book is an object?

    What do I use to see if the array contains a String then?

    Thank you for your help
  2. Replies
    3
    Views
    659

    Finding String in ArrayList

    I am having some trouble searching an ArrayList to see if it contains a string.


    public Book findByTitle(String title){

    Book book = new Book();

    int location;...
  3. Replies
    6
    Views
    1,449

    Re: Scanner.useDelimiter("\n") Problem

    Yeah the \n changes it. I might just not use it, and use my other solution to the problem I was having. Appreciate your help anyway!
  4. Replies
    6
    Views
    1,449

    Re: Scanner.useDelimiter("\n") Problem

    Just the number 1.

    If I remove the s.useDelimiter("\n");

    There is no problems, but I was told to use this to solve another problem, which is using nextLine() before a nextInt().
  5. Replies
    6
    Views
    1,449

    Re: Scanner.useDelimiter("\n") Problem

    Exception in thread "main" java.util.InputMismatchException
    at java.util.Scanner.throwFor(Unknown Source)
    at java.util.Scanner.next(Unknown Source)
    at java.util.Scanner.nextInt(Unknown Source)...
  6. Replies
    6
    Views
    1,449

    Scanner.useDelimiter("\n") Problem

    Hey guys I am having some trouble when I use Scanner.UseDelimeter("\n") basically I have:


    Scanner s = new Scanner(System.in);
    s.useDelimiter("\n");

    int amount;

    ...
Results 1 to 6 of 6