+ 1

What does the following Java program print?

public class Test { public static void main(String[] args) throws Exception { char[] chars = new char[] {'\u0097'}; String str = new String(chars); byte[] bytes = str.getBytes(); System.out.println(Arrays.toString(bytes)); } }

18th Feb 2017, 3:47 AM
Kartikeya Bhardwaj
Kartikeya Bhardwaj - avatar
4 Respuestas
+ 1
[63]
18th Feb 2017, 4:31 AM
Jian-hua Yeh
Jian-hua Yeh - avatar
0
Nothing
18th Feb 2017, 3:58 AM
Abdelaziz Abubaker
Abdelaziz Abubaker - avatar
0
do i need a computer to find out?
18th Feb 2017, 4:35 AM
Hyper89
0
on windows,it prints 63 but on Linux and Solaris u will get different values.
18th Feb 2017, 4:45 AM
Kartikeya Bhardwaj
Kartikeya Bhardwaj - avatar