Hi. I'm new to Java but been programming for a few years. Mainly PHP (Quite a few similarities between the two). I'm copying an example form a book.
char symbol;
while (diskScanner.hasNext()) {
symbol = diskScanner.findInLine(".").charAt(0);
while (symbol != "@") {
diskWriter.print(symbol);
symbol = diskScanner.findInLine(".").charAt(0);
}
diskScanner.nextLine();
diskWriter.println();
}
The 'symbol !="@"' part is throwing 'Incompatible operand types char and String'. Not sure why, as symbol has been declared as a char and "@" is a char!