package utfTest; import java.io.UnsupportedEncodingException; public class UTFTest { public static void main(String[] args) { String s="我"; try { byte[] by = s.getBytes("UTF-8"); for(byte b : by){ System.out.println(b); } byte[] by1 = {-26,-120,-111}; String s1 = new String(by1,"UTF-8"); System.out.println(new String(s1)); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } }