stringtest.java

来自「数字图书馆的互操作接口」· Java 代码 · 共 31 行

JAVA
31
字号
package dli2fe.test;

/**
 * Title:        Digial Library Interoperable Interface Fudan Edition
 * Description:  This project contains all the classes required for DLI2FE interface. Developers use these classes to implement the wrapper and client side codes. The basic functions of DLI2FE is as follows:
 * Search: Search a digital library source site.
 * Metadata: Fetch metadata for a site.
 * ResultAccess: Get results for a given query.
 * DLI2FE uses Dublin Core as the basic attribute model, DAV/DASL as the general XML-based query language and CORBA as distributed object transportation mechanism.
 * Copyright:    Copyright (c) 2001
 * Company:      Fudan University
 * @author Carl Tao
 * @version 1.0
 */
import java.util.*;
import javax.swing.Timer;
import java.awt.event.*;


public class StringTest implements ActionListener {
  public static void main(String[] args) {
    String strDID = String.valueOf(4);
    for (int i=0; i<3-strDID.length(); i++)
      strDID = "0"+strDID;
    System.out.println(strDID);
  }

  public void actionPerformed(ActionEvent e) {
    System.out.println("Timer fired");
  }
}

⌨️ 快捷键说明

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