Tool class and system parameter class

xiaoxiao2021-03-06  22

/ * * CREATED ON 2004-12-15 * * Integrate * / package util;

/ ** * @Author zhang * * Integrate various configuration parameters * / public class configs {// database various parameters public static string dirvername = "com.microsoft.jdbc.sqlser.sqlserverdriver"; public static string url = "JDBC: Microsoft: SQL Server: // localhost: 1433; DatabaseName = Northwind"; public static string password = "sa"; public static string username = "sa";} / * * created on 2004-12-16 * single Mode design * / package util; public class sqlfactory {// public static mysql msql; // public static final int passsql = 1; public static passsql getpasssql () {return new passsql ();}} package util;

/ * * Created on 2004-12-15 * * Todo to change the template for this generated file go to * window - preferences - java - code style - code templates * /

/ ** * @author zhang * * changing the input date format * / import java.util *;. Import java.text.DateFormat; import java.text.SimpleDateFormat; public class DateUtil {public static final String ymdhms = "yyyy / MM / DD '-' HH: MM: SS "; Public Static String Format (Calendar C, String S) {Return New SimpleDateFormat (s) .format (C.getTime ());} public static void main (String" ] args) {string s = dateutil.format (Calendar.getInstance (), Dateutil.ymdhms;}}

转载请注明原文地址:https://www.9cbs.com/read-79359.html

New Post(0)