- 博客(3)
- 收藏
- 关注
原创 java 汉字/英字母 转为区位码输出
首先确定思路: 1.首先将起始值转为字节数组 2.通过字节数组判断起始值是否合规(符合我们设定的规则) 3.使用if…else来做简单的判断 public class StartMyTest { // 创建 public static void main(String args[]) { // 创建主方法 String texth = ("你");//设定起始值 byte[] codeBit = texth.getBytes();// 获取汉字的字节数组 if(codeBit.lengt
2021-04-21 10:09:50
519
原创 java 将word转为html格式方法
import com.spire.doc.*; public class WordToHtml { public static void main(String[]args) { Document doc = new Document(“sample.docx”); doc.saveToFile(“ToHTML.html”,FileFormat.Html); } }
2021-04-20 19:28:01
367
原创 java交换两个变量的值(方法介绍)
java交换两个变量的值(方法介绍) //方法1: int A = 3; System.out.println("a:"+A); int B = 4; System.out.println("b:"+B); A = A ^ B; B = B ^ A; A = A ^ B; System.out.println("a:" + A + ",b:" + B); //异或方法转换int数值 //方法2: double A1 = 3.3; double B1 = 2.1; do
2021-04-20 10:10:09
103
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人