Why is useDelimiter not working java
<p>So I my program reads a .txt file and I am using .useDelimeter to seperate the pets and put them in an arraylist:</p>

<pre><code>try{
          Scanner   petReader = new Scanner(new File("pet3-dogs.txt"));
           petReader.useDelimiter(",");
            String line2 = petReader.nextLine();

             while(petReader.hasNextLine()){   //the while loop stores each attribute in the appropriate variable and arraylist of petshops while there's another line.
                petReader.useDelimiter(",");


                String shop =petReader.next();
               String type =petReader.next();
                double price = Double.parseDouble(petReader.next());
               Date date = df.parse(petReader.next());
                String notes =petReader.nextLine(); 
                String size =petReader.nextLine(); 
                String neutered =petReader.nextLine();
              petReader.useDelimiter(",");

                pets.add(new Pet(shop, type, price, date, notes, size, neutered));
                 System.out.println(pets.toString());
            }




        }   catch(Exception e){
                   JOptionPane.showMessageDialog(null, e); //if the program wasn't able to read the file, it will display a message dialog.      
                     }
</code></pre>

<p>This is the output. Infact it gets the next petshops in the last two variables:</p>

<pre><code>[Solly's Pet Store
Giant Schnauzer
£176.43
Wed Jul 07 00:00:00 BST 2010
,none,Medium,no
The Menagerie,Neapolitan Mastiff,293.73,29/08/2010,none,Medium,no
Obsborne Road Pet Store,Basenji,224.27,13/10/2010,none,Large,yes
]
</code></pre>

<p>My expected output is</p>

<pre><code>Solly's Pet Store
Giant Schnauzer
£176.43
Wed Jul 07 00:00:00 BST 2010
none
Medium
no.
</code></pre>

<p>This is my Pet class:</p>

<pre><code>public class Pet {
    private String shop;
    private String type;
    private double price;
    private Date dateAquired;
    private String notes;
    private String size;
    private String neutered;

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getNeutered() {
        return neutered;
    }

    public void setNeutered(String neutered) {
        this.neutered = neutered;
    }





    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public String getShop() {
        return shop;
    }

    public void setShop(String shop) {
        this.shop = shop;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Date getDateAquired() {
        return dateAquired;
    }

    public void setDateAquired(Date dateAquired) {
        this.dateAquired = dateAquired;
    }

    public Pet(String pShop, double pPrice){

        this.shop = pShop;
        this.price = pPrice;

    }

    public Pet(String pShop, String pType, double pPrice, Date pDateAcquired, String pNotes, String pSize, String pNeutered){



        this.shop = pShop;
        this.type = pType;
        this.price = pPrice;
        this.dateAquired = pDateAcquired;
        this.notes = pNotes;
       this.size = pSize;
        this.neutered = pNeutered;

    }

 @Override
    public String toString(){
        return getShop()+"\n"
                +getType()+"\n"
                +"£"+getPrice()+"\n"
                +getDateAquired()+"\n"
                +getNotes()+"\n"
                +getSize()+"\n"
                +getNeutered()+"\n";
    }

}
</code></pre>

<p>This is the <a href="https://drive.google.com/file/d/0Bzpd7hMBhsKYcTJrdm9PRE1GcEE/view?usp=sharing" rel="nofollow">file</a> it is reading from.</p>