function.java

来自「该代码是《JSP应用与开发实例》一书的配套光盘」· Java 代码 · 共 24 行

JAVA
24
字号
package com.jspdev.ch16;
import java.io.*;
public class Function
{
	public static String trans(String chi)
    {
		String result = null;
        byte temp [];
        try
         {
              temp=chi.getBytes("iso-8859-1");
                      result = new String(temp);
          }
          catch(UnsupportedEncodingException e)
          {
                 System.out.println (e.toString());
          }
		return result;
	}
	public static int add(int x,int y)
	{
		return x+y;
	}
}	

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?