上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 42 下一页
摘要: 1,静态导入import static java.lang.Math.*;//静态导入的是静态方法和静态类,或者是静态成员变量class StaticImport { public static void main(String[] args) { int a=Math.max(10,20); int b=Math.min(10,20); System.out.println(a); System.out.println(b); }} 2,装箱和拆箱//装箱和拆箱//值类型转换为引用类型---装箱//引用类型转换为值类型---拆箱class BoxAndUnBox { pub... 阅读全文
posted @ 2013-04-16 00:00 尼姑哪里跑 阅读(215) 评论(0) 推荐(0) 编辑
摘要: package anby.com;import java.util.Iterator;public class Dom4JRead { public static void main(String[] args) throws DocumentException { //Dom4JReader(); SAXReader saxreader=new SAXReader(); Document doc=saxreader.read("Book.xml"); Node node =doc.selectSingleNode("//book[@id='boo1 阅读全文
posted @ 2013-04-13 21:27 尼姑哪里跑 阅读(361) 评论(0) 推荐(0) 编辑
摘要: package anby.com;import java.io.File;import java.io.FileWriter;import java.io.IOException;import org.dom4j.Attribute;import org.dom4j.Document;import org.dom4j.DocumentException;import org.dom4j.DocumentHelper;import org.dom4j.Element;import org.dom4j.Node;import org.dom4j.io.SAXReader;import org.do 阅读全文
posted @ 2013-04-13 21:23 尼姑哪里跑 阅读(193) 评论(0) 推荐(0) 编辑
摘要: public static DataTable InitDgvProcessWorker() { ArrayList list=new ArrayList(); DataTable dt = new DataTable(); string str= "select WorkerNO as 工号,[Name] as 姓名,DutyContent as 职 责,[Group] as 组名... 阅读全文
posted @ 2013-04-13 14:32 尼姑哪里跑 阅读(295) 评论(0) 推荐(0) 编辑
摘要: package anby.com;import java.io.File;import java.io.IOException;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;import javax.xml.parsers.ParserConfigurationException;import javax.xml.transform.Source;import javax.xml.transform.Transformer;import javax.xml.tra 阅读全文
posted @ 2013-04-12 00:01 尼姑哪里跑 阅读(365) 评论(0) 推荐(0) 编辑
摘要: package anby.com;import java.io.File;import java.io.IOException;import java.util.ArrayList;import java.util.List;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;import javax.xml.parsers.ParserConfigurationException;import org.w3c.dom.Document;import org.w3c.d 阅读全文
posted @ 2013-04-11 22:08 尼姑哪里跑 阅读(315) 评论(0) 推荐(0) 编辑
摘要: import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.ObjectInputStream;import java.io.ObjectOutputStream;import java.io.Serializable;import java.util.Properties;public class Properties序列化和反序列化{ /** * @param args */ public static void main(String[] args) { try { Perso... 阅读全文
posted @ 2013-04-11 08:37 尼姑哪里跑 阅读(404) 评论(0) 推荐(0) 编辑
摘要: // SendMessage.java - Sample application.//// This application shows you the basic procedure for sending messages.// You will find how to send synchronous and asynchronous messages.//// For asynchronous dispatch, the example application sets a callback// notification, to see what's happened with 阅读全文
posted @ 2013-04-10 19:18 尼姑哪里跑 阅读(905) 评论(2) 推荐(0) 编辑
摘要: View Code public class FactoryMethod{ /** * @param args */ public static void main(String[] args) { Factory.condition(2).operation("Hello"); }}class Factory{ public static Api condition(int n) { if (n == 1) { return new ImpA(); } ... 阅读全文
posted @ 2013-04-09 19:02 尼姑哪里跑 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 多线程import java.io.IOException;import java.util.Set;public class ProcessBuilderDemo{ public static void main(String[] args) { final Person p=new Person(); Thread thread=new Thread() { boolean flag=false; public void run() { ... 阅读全文
posted @ 2013-04-09 14:09 尼姑哪里跑 阅读(182) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 42 下一页