Delphi FormatDateTime日期时间的用法
// 测试
procedure TfrmMain.btnDateClick(Sender: TObject);
var
logDate: string;
begin
try
logDate:= FormatDateTime(‘yyyy-mm-dd hh:nn:ss’, now);
mmLine.Lines.Add(logDate);
finally
end;
end;
// 测试
procedure TfrmMain.btnDateClick(Sender: TObject);
var
logDate: string;
begin
try
logDate:= FormatDateTime(‘yyyy-mm-dd hh:nn:ss’, now);
mmLine.Lines.Add(logDate);
finally
end;
end;
package com.ssm.cts.test;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.Stack;
import java.util.Vector;
public class ClassTest {
package com.ssm.cts.test;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Stack;
import java.util.Vector;
public class ClassTest {
// 测试
public static void main(String[] args) {
Hashtable<String, String&g
package com.ssm.cts.test;
import java.util.Enumeration;
import java.util.Stack;
import java.util.Vector;
public class ClassTest {
// 测试
public static void main(String[] args) {
Stack<Integer> st = new Stack<Integer>();
st.
package com.ssm.cts.test;
import java.util.Enumeration;
import java.util.Vector;
public class ClassTest {
// 测试
public static void main(String[] args) {
Enumeration<String> elem;
Vector<String> site = new Vector<String>
package com.ssm.cts.test;
public class ClassTest {
// 测试
public static void main(String[] args) {
// 创建不同类型数组: Integer, Double 和 Character
Integer[] intArr = { 1, 2, 3, 4, 5 };
Double[] doubleArr = { 1.1, 2.2, 3.3, 4.4 };
Character[] ch
package com.ssm.cts.test;
public abstract class Bike {
private String name;
public abstract void start();
}
package com.ssm.cts.test;
public class MotoBike extends Bike {
@Override
public void start() {
System.out.println(“启动”);
}
使用 implements 关键字可以变相的使java具有多继承的特性,使用范围为类继承接口的情况,可以同时继承多个接口(接口跟接口之间采用逗号分隔)。
package com.ssm.cts.test;
public interface ICar {
public void start();
public void stop();
}
package com.ssm.cts.test;
public interface ICarFly {
public void
package com.ssm.cts.test;
public class Car {
public String code;
private String name;
public Car(String _name) {
super();
this.name = _name;
}
public void start() {
System.out.println(name + “启动”);
}
public void stop() {
Syste
package com.ssm.cts.test;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.
package com.ssm.cts.test;
public class ClassTest {
// 测试
public static void main(String[] args) {
StringBuffer sb = new StringBuffer(“网址:”);
sb.append(“idodo”);
sb.append(“.xin”);
System.out.println(sb);
}
}
package com.ssm.cts.test;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.Stack;
import java.util.Vector;
public class ClassTest {
procedure TfrmMain.btnTestClick(Sender: TObject);
var
name: String;
age: Integer;
i : Integer;
begin
try
name := ‘jzh’;
age := 22;
mmLine.Text := name + IntToStr(age);
for i := 0 to 5 do
begin
mmLine.Lines.Add(IntToStr(i));