util.java

来自「这个也是关于图书管理系统的代码」· Java 代码 · 共 46 行

JAVA
46
字号
package com.xmspk.ebp.books;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: Apr 18, 2003
 * Time: 12:55:44 PM
 * To change this template use Options | File Templates.
 */
import java.lang.*;
import java.sql.*;

public class Util {
    public Util(){

    }

    //convert String=null to  "";
    public String Blank(String str){
        String temp = new String();
        temp=(str==null)?"":str.trim();
        return temp;
    }
    //convert Date=null to ""
    public String ConvDate(Date date){
        String temp = new String();
        if(date==null){
            temp="";
            return temp;
        }
        else
            return date.toString();
    }
    //convert null to ""
    public String Covert(Object o){
        String temp = new String();
        if (o==null){
            temp = "尚未归还";
            return temp;
        }
        else
            return o.toString();
    }

}

⌨️ 快捷键说明

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