XXXXX

String s1="The People's Liberation Army overhauled its regional command system on Monday in an attempt to improve the military's joint operational capability.";

String s2="   President Xi Jinping, also chairman of the Central Military Commission, presented PLA flags to top officers from the five newly established areas of command at a ceremony at the commission's headquarters in Beijing.";

String s3="The new areas are Eastern Theater Command, Southern Theater Command, Western Theater Command, Northern Theater Command and Central Theater Command.";

String s4="They replace the seven regional commands named after the cities where their headquarters were located — Beijing, Shenyang, Ji'nan, Lanzhou, Nanjing, Chengdu and Guangzhou.";

String s5="Xi said the five theater commands are responsible for dealing with security threats in their respective strategic fields, maintaining peace, containing wars and winning wars, noting their pivotal role in safeguarding the country's overall national security and military strategies.";

String s6="Yang Yujun, a spokesman for the Defense Ministry, said at a news conference on Monday evening that rearranging the regional military commands will not change the PLA's defensive nature. He added that the military will take good care of officers affected by the overhaul.";

String s7=" 十年生死两茫茫。不思量,自难忘。千里孤坟,无处话凄凉。纵使相逢应不识,尘满面,鬓如霜。 夜来幽梦忽还乡。小轩窗,正梳妆。相顾无言,唯有泪千行";

String s8="1122154652321";

Date date=new Date();

System.out.println(String.format("%tH", date));

// if(test1.IsNumber(s8)){

// System.out.println(s8+" is digital type.");

// }else{

// System.out.println(s8+" is not digital type.");

// }

//string index

// System.out.println("on first position: "+s1.indexOf("on"));

// System.out.println("on last position: "+s1.lastIndexOf("on"));

// //acquire char

// System.out.println("the 20th char is: "+s1.charAt(20));

// //str.trim()  

// System.out.println("after trim s2 is:"+s2.trim());

// //replace

// System.out.println(s3.replace("The", "111"));

// System.out.println(s3.replaceFirst("The", "222"));

// //assert

// System.out.println(s5.startsWith("Xi"));

// //to upper case

// System.out.println(s6.toUpperCase());

// //split

// String[] sp=s4.split(" ");

// for(int i=0;i<sp.length;i++){

// System.out.println(sp[i]);

// }

// String[] sp1=s7.split(",|。");

// for(int i=0;i<sp1.length;i++){

// System.out.println(sp1[i]);

// }


你可能感兴趣的:(XXXXX)