package com.tarena.fly; /** * \* Created with IntelliJ IDEA. * \* User: 武健 * \* Date: 2018/1/29 * \* Time: 20:45 * \* To change this template use File | Settings | File Templates. * \* Description:String 字符串 交换位置 * \ */ public class Main { public static void main(String[] args) { String a = "A"; String b = "B"; String temp = ""; temp = a; a = b; b = temp; System.out.println(a); System.out.println(b); } }
java基础面试题之String字符串交换位置
最新推荐文章于 2024-02-01 14:07:19 发布