Java数字转字符串前面自动补0的实现
本文原址:http://blogger.org.cn/blog/more.asp?name=hongrui&id=46926
/**
* Java里数字转字符串前面自动补0的实现。
*
*/
public class TestStringFormat {
public static void main(String[] args) {
int youNumber = 19;
// 0 代表前面补充0
// 4 代表长度为4
// d 代表参数为正数型
String str = String.format("%02d", youNumber);
System.out.println(str); // 01
}
}
相关文档:
from Rxtx
This page is for general content regarding the use of rxtx. Feel free to add your own content.
Using RXTX In Eclipse
Deploying JAVA with RXTX
I wrote an app several months ago using javax.comm on windows. Sun has left me high and dry. rxtx help!
download ftp://ftp.qbang.org/pub/rx ......
1.what is oracle.
2.what is major differenece oracle8i and oracle9i.
4.tell me some thing ur self.
5.please tell me about oops.
6.what is single inheritance.
7.what is multiple inheritance.
8.can java support multiple inheritance.
9.what is interface.
10.what is differenec between abstract c ......
FileDialog只能选择文件而不能选择文件夹。JFileChooser又太大,不太好看,鼓捣了好一会终于解决了。
记录一下关键部分代码,以备查用。
final JButton choose=new JButton("选择存储文件目录");
final JTextField dir=new JTextField();
final JFileChooser chooser=new JFileChooser();
chooser.setFileSe ......
import java.util.Random;
/**
* 排序测试类
*
* 排序算法的分类如下:
* 1.插入排序(直接插入排序、折半插入排序、希尔排序);
* 2.交换排序(冒泡泡排序、快速排序);
* 3.选择排序(直接选择排序、堆排序);
* 4.归并排序;
* 5.基数排序。
&nbs ......
Java邮件群发器
功能说明:
1、批量循环发送邮件
2、发送HTML文件,待发送的邮件以htm的格式存放,可以是网络上的htm文件,可以是本地的htm文件
3、可以指定发送附件的目录,系统会加载指定目录的全部附件一起发送
4、发送邮件以txt文件保存,每行保存一个邮件 ......