提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
使用字符和字符串转换字符。
public class Main { public static void main(String[] args) { /** 来 自 时代Java **/ char character = 'A'; // initialize char String string = "This is also a string"; // String object Integer integer = 1234; // initialize integer (autoboxing) System.out.printf("%c\n", character); System.out.printf("%s\n", "This is a string"); System.out.printf("%s\n", string); System.out.printf(