`
zhaohong
  • 浏览: 59362 次
  • 性别: Icon_minigender_1
  • 来自: 郑州
社区版块
存档分类
最新评论
文章列表
package com.test.clone; import java.util.*; public class CloneTest { public static void main(String[] args) { try { Employee original = new Employee("John Q. Public", 50000); original.setHireDay(2000, 1, 1); Employee copy = original.clone(); copy.raiseSalary(10); ...
根据马士兵老师聊天室程序进行优化,同时增加聊天者之间的交互。 同时增加服务端会为每一个客户端增加一个交互窗口,让服务器可以和每一个客户端交互! 服务端代码 import java.net.*; import java.util.*; import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.JFrame; public class ChatServer extends JFrame { JTextArea ta = n ...
为了区别于传统的C/S模式,才特意将其称为B/S模式。认识到这些结构的特征,对于系统的选型而言是很关键的。 1、系统的性能 在系统的性能方面,B/S占有优势的是其异地浏览和信息采集的灵活性。任何时间、任何地点、任何 ...
package com.test.string; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.TreeMap; public class testString { public static void mai ...
这是一个多对一单向关联的一个例子,目的是为了总结一下Hibernate的基础知识。 生成 Classes  和student类   package com.test.hibernate; import java.util.Set; public class Classes { private int id; private String name; private Set students; public int getId() { return id; } public void setId(int id) { ...
今天晚上没有什么事做了!不是没有什么事做了,而是不知道去做什么了,睡不觉就写点心情吧! 放假到现在一个多月了,在学校一直看书,心里感觉学到了很多东西,可也感觉不会的也太多了。老感觉有一种压力,不是别人给的,是自己给自己的,开学就大四了,毕业就在眼前,一定要给自己一个好的出路。有时间同学说没必要这么努力,可我知道有很多东西要去学,不会的太多了,路还很长很长,既然选择了这条路就要一直走下去。 晚上同学来我这看我的学习成果,给我介绍了他们班那个同学用.NET做的系统怎么好,又要看我的,我说没有,他还不信!真是没有什么好在同学面前炫耀的,自己一直在学习基本的东西,没有时间去做个东西。不知道自己是对还 ...
import java.io.* ; import java.util.* ; public class Demo { public static void main(String args[]) throws Exception { Properties p = new Properties() ; p.setProperty("a","Apple") ; p.setProperty("o","Orange") ; p.setProperty("b" ...
public class testProducerConsumer { public static void main(String[] args) { ProductContainer pc = new ProductContainer(); Producter producter = new Producter(pc); Consumer consumer = new Consumer(pc); new Thread(producter).start(); new Thread(consumer).start(); } } class P ...
代码1    //生成一个可以序列化的普通类! import java.io.Serializable; public class Configyration implements Serializable {  private String str; private int i;  public String getStr() {  return str; }  public void setStr(String str) {  this.str = str; }  public int getI() {  return i; }  public void setI(in ...
import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.text.SimpleDateFormat; public class TestDate { public static void main(String[] args) { Connectio ...
import java.lang.reflect.Method; public class InvokeTester { public int add(int param1, int param2) { return param1 + param2; } public String echo(String mesg) { return "echo" + mesg; } public static void main(String[] args) throws Exception { Class classType = I ...
               Struts2.0 类型转换学习笔记 input.Jsp页面主要代码 <s:form action="pointaction">          <s:textfield name="point" label="point"></s:textfield>        <s:textfield name="point" label="point2"></
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import org.jdom.Attribute; import org.jdom.Document; import org.jdom.Element; import org.jdom.output.Format; import org.jdom.output.XMLOutputter; public class generateXML { public static void main(String ...
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.io.StringReader; import java.util.Iterator; import java.util.List; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDO ...
import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.sql.*; import org.jdom.Document; import org.jdom.Element; import org.jdom.output.XMLOutputter; public class XMLfromMYSQL { public static void main(String[] args) { ResultSe ...
Global site tag (gtag.js) - Google Analytics