Java的final和static区别
linux下安装后缀为bin的JavaJDK
Java数字转字符串前面自动补0的实现
import java。io。*;
import java。util。*;
import javax。mail。
import javax。mail。internet。*;
public class Mailer {
/** javamail session对象。 */
protected Session session;
/** 发信地址 */
protected String from;
/** 信的标题*/
protected String subject;
/** 存放字符串形式的收信地址 */
protected ArrayList toList = new ArrayList();
/** 抄送地址*/
protected ArrayList ccList = new ArrayList();
/** 暗送地址 */
protected ArrayList bccList = new ArrayList();
/** 信的文本内容*/
protected String body;
/** SMTP服务器地址*/
protected String mailHost;
/**是否在控制台打印信息*/
protected boolean verbose=true;
/** Get from */
public String getFrom() {
return from;
public void setFrom(String fm) {
from = fm;
public String getSubject() {
return subject;
public void setSubject(String subj) {
subject = subj;
public ArrayList getToList() {
return toList;
public void setToList(ArrayList to) {
toList = to;
public void setToList(String s) {
toList = tokenize(s);
public void addTo(String to) {
toList。
add(to);
public ArrayList getCcList() {
return ccList;
public void setCcList(ArrayList cc) {
ccList = cc;
public void setCcList(String s) {
ccList = tokenize(s);
public void addCc(String cc) {
ccList。
add(cc);
public ArrayList getBccList() {
return bccList;
public void setBccList(ArrayList bcc) {
bccList = bcc;
public void setBccList(String s) {
bccList = tokenize(s);
public void addBcc(String bcc) {
bccList。
add(bcc);
public String getBody() {
return body;
public void setBody(String text) {
body = text;
public boolean isVerbose() {
return verbose;
public void setVerbose(boolean v) {
verbose = v;