Boa noite, vou deixar meu código abaixo e os detalhes no final para o entendimento.
package br.com.alura.java.io.teste;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
public class TesteUnicodeEncoding {
    public static void main(String[] args) throws UnsupportedEncodingException {
        // TODO Auto-generated method stub
        String str = "é";
        System.out.println(str.codePointAt(0));
        Charset cset = Charset.defaultCharset();
        System.out.println(cset.name());
        byte[] bytes = str.getBytes("windows-1252");
        System.out.println(bytes.length + " - windows-1252");
        String strNew = new String(bytes, "windows-1252");
        System.out.println(strNew);
        bytes = str.getBytes("UTF-16");
        System.out.println(bytes.length + " - UTF-16");
        strNew = new String(bytes, "UTF-16");
        System.out.println(strNew);
        bytes = str.getBytes("UTF-8");
        System.out.println(bytes.length + " - UTF-8");
        strNew = new String(bytes, "UTF-8");
        System.out.println(strNew);
        bytes = str.getBytes(StandardCharsets.US_ASCII);
        System.out.println(bytes.length + " - US_ASCII");
        strNew = new String(bytes, StandardCharsets.US_ASCII);
        System.out.println(strNew);
    }
}Console:
233
UTF-8
1 - windows-1252
�
4 - UTF-16
�
2 - UTF-8
�
1 - US_ASCII
?Bom... Tento realizar a atividade "Mão na Massa", entretanto o console mostra valores diferentes. Realizei a estrutura de código e a única diferença que possuo é que os arquivos estão em UTF-8 (Entrando nos Properties dos arquivos e vi ali). Gostaria de um retorno pra saber se tem algo errado.
OBS: Meu código nao executa se eu mudo as Properties para Windows-1252 como dito pelo instrutor.
(jdk 19.0.2)
 
            