如何用Java编写输出字符串并使其居中显?
如何用Java编写输出字符串并使其居中显示
答案字数较多,建议语音阅读
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); } }
答:你说的太笼统啦 调用 09 LEA DX, 要显示部分的首地址(到$结束) MOV AH,9 INT 21H RET详情>>