请帮助我理解以下代码行的输出:
byte[] byteArray1 = Charset.forName("UTF-8").encode("hello wor").array();
System.out.println(byteArray1.length); // 9 - This is as expected.
byte[] byteArray2 = Charset.forName("UTF-8").encode("hello world").array();
System.out.println(byteArray2.length); // 12 - Shouldn't it be 11?
byte[] byteArray3 = Charset.forName("UTF-16").encode("hello wor").array();
System.out.println(byteArray3.length); // 37 - Why?
byte[] byteArray4 = Charset.forName("UTF-16").encode("hello world").array();
System.out.println(byteArray4.length); // 45 - Why?