Yes, as you have guessed, both are newline characters.
The difference is that the double quotes represents a string and the
single quotes replresents a character.
You usually add the double quotes when using it with a line of string to display it on a new line.
While the character is used when you do a comparison character by character.
for example
if(str.charAt(10)=='\n')