Q:

How to skip a character when using Scanner

I want to read words from a text file which looks like: 
"A","ABILITY","ABLE","ABOUT","ABOVE","ABSENCE","ABSOLUTELY","ACADEMIC","ACCEPT","ACCESS","ACCIDENT","ACCOMPANY", ...

I read the words using split("\",\"") so I have them in a matrix. Unfortunately I cannot skip reading the first quotation mark, which starts my .txt file, so as a result in my console I have:
"A
ABILITY
ABLE
ABOUT
ABOVE

Do you know how can I skip the first quotation mark? I was trying both 
Scanner in = new Scanner(file).useDelimiter("\""); 

and parts[0].replace("\"", "");, but it doesn't work.
package list_1;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class exercise {
  public static void main(String[] args) throws FileNotFoundException{
      File file = new File("slowa.txt");
      Scanner in = new Scanner(file).useDelimiter("\"");     //delimiter doesn't work!

      String sentence = in.nextLine();
      String[] parts = sentence.split("\",\"");
      parts[0].replace("\"", "");                 //it doesn't work!

      for (int i=0; i<10 ; i++){
          System.out.println(parts[i]);
      }
  }
}

A:

Strings are immutable which means that you can't change their state. Because of that replace doesn't change string on which it was invoked, but creates new one with replaced data which you need to store somewhere (probably in reference which stored original string). So instead of 
parts[0].replace("\"", "");  

you need to use 
parts[0] = parts[0].replace("\"", "");  

Anyway setting delimiter and using nextLine doesn't make much sense because this method is looking for line separators (like \n \r \r\n), not your delimiters. If you want to make scanner use delimiter use its next() method. 
You can also use different delimiter which will represent " or ",". You can create one with following regex "(,")?. 
So your code could look like
Scanner in = new Scanner(file).useDelimiter("\"(,\")?");
while(in.hasNext()){
    System.out.println(in.next());
}

