Character encoding when reading files
QuizMediumJava only
A character encoding (a charset) is the rule that turns bytes in a file into text characters. Which statements about it in Java 21 are true? Pick all that apply.
- The default charset is UTF-8 on every platform
Files.readAllLines(path)uses UTF-8- Reading a file saved in another encoding with the wrong charset can give wrong characters or an exception
- Java strings cannot hold non-English characters
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.