📄 test.java
字号:
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.TreeSet;
import java.util.WeakHashMap;
import commonResource.Person;
public class test {
/*public static void main(String[] args)
{
/*Date utildate=new java.util.Date();
System.out.println("utildate="+utildate);
java.sql.Date sqldate=new java.sql.Date(utildate.getTime());
try {
Thread.sleep(1000*2);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//System.out.println("sqldate="+sqldate.getHours());
Date date=new java.util.Date(sqldate.getTime());
System.out.println(date);*/
//java.sql.Connection conn=null;
/**try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
conn=DriverManager.getConnection("jdbc:sqlserver://localhost:1433; DatabaseName=agendas","sa","851743");
ResultSet s=conn.prepareCall("{call "+"queryUser(lijun)"+"}").executeQuery();
while(s.next())
{
System.out.println("userName="+s.getString("userName"));
}
System.out.println("connection success!!!");
} catch (ClassNotFoundException e) {
System.out.println("int classnofoundException!");
e.printStackTrace();
} catch (SQLException e) {
System.out.println("int SQLException..!");
e.printStackTrace();
}3526198*/
/**String s="sdfds";
System.out.println("s.index="+s.lastIndexOf("ds",2));
Map m=new HashMap<Person,String>();
Set set=new TreeSet();
Person p=new Person("l","2222");
Person p1=new Person("l","2222");
//WeakHashMap m=new WeakHashMap();
set.add(p);
//set.add(p1);
//if(set.)
//System.out.print("set contains p1");
int i=p.hashCode();
/*System.out.println("lijun".hashCode());
System.out.println("lijum".hashCode());
System.out.println("li".hashCode());
System.out.println("mi".hashCode());/
//String.class.n
String pro=System.getProperty("sun.desktop");
Properties pp=System.getProperties();
Enumeration<?> enu=pp.propertyNames();
int j=0;
while(enu.hasMoreElements())
{
j++;
System.out.println(enu.nextElement());
}
try {
Person person=(Person)Class.forName("p").newInstance();
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("j="+j);
System.out.println("pro="+pro);
System.out.println(set.getClass());
System.out.println(i);
System.out.println(p1.hashCode());/
}*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -