java中怎麼把輸出居中
2023-03-29 07:17:09 1
public class StringTest { public static void main(String[] args) { String s = "1234567890"; byte[] b = s.getBytes; byte[] c = new byte[b.length]; for (int i = b.length - 1; i >= 0; i--) { c[i] = b[b.length - i - 1]; } s = new String(c); System.out.println(s); } }。