星期一晚上结贴,80! 2天时间足够了吧~ java是很清澈的语言~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 JAVABEAN 没有多少限制,就是java的基础的东西,你看过了THINKING IN JAVA 就可以了。 java bean 比较容易 请大家帮个忙,如何才能把一个ip地址挂两个域名。www.e5135.com [email protected] to: sunjianchang(sunjian)~~~哈哈~``你没分了么??呵呵~`这么可怜~`到处问~` 其实,JAVABEAN 就是用JAVA写的 ,用在JSP中的类。如果面向基础好,看几天就差不多。这是进行DB连接的一个小的BEAN:package PublicUserClass.dbBean;/** * <p>Description: 存储常用数据缓冲的类</p> * @version 1.0 */import java.io.*;import java.util.*;public class DataStore{ static private DataStore instance; private HashMap hm=new HashMap(); private String datakind=""; public DataStore(){} /** * 设置数据缓冲中的数据 * @param key 索引 */ public void setDataStore(Object key,Object value){ hm.put(key,value); } /** * 获取数据缓冲中的数据类型 * @return */ public String getDataKind(Object key) throws Exception{ Object obj=new Object(); obj=hm.get(key); if (obj instanceof String) { this.datakind="String"; } else if (obj instanceof Integer) { this.datakind="Integer"; } else if (obj instanceof Long) { this.datakind="Long"; } else if (obj instanceof java.sql.Date) { this.datakind="Date"; } else if(obj instanceof String[][]){ this.datakind="String[][]"; } else if(obj instanceof int[][]){ this.datakind="int[][]"; } else if(obj instanceof int[][]){ this.datakind="float[][]"; } else { throw new Exception("选择的数据不是可识别类型!"); } return datakind; } /** * 判断数据是否存在 * @return boolean */ public boolean getIsExist(Object key){ return (hm.containsKey(key)); } JAVABEAN 就是用JAVA写的,看懂了Java,看JavaBean就比较容易。但JavaBean一般都与JSP和Servlet同用, 所以要学之前最好学一点JSP和Servlet的知识。 同时,应用时还要了解一下Html和JavaSript...... 如果你把javabean看成一个简单的基类,你通过这个基类可以实现B/S或者其他什么的功能,就比较好理解了。 Metbeans生成的Jar文件为什么在电脑上运行不了,还让选择打开方式,请问怎么做。谢谢! 关于class文件名的问题 JPanel中的组件动态添加 请问 带冒号的 for 循环 用法 字符串删除和统计问题 高手请进,分不够可以再加!从数据库快速读取二进制图片的问题! 图像绘制的问题 怎么写重做和撤消的代码? 哪里有卖SL-275的教材? 大哥们请帮忙!!!!!!!!!!! Java API都是用Java开发的吗? 有无方法将Vector转换为相同大小的数组,如果有,怎么办
* <p>Description: 存储常用数据缓冲的类</p>
* @version 1.0
*/
import java.io.*;
import java.util.*;public class DataStore{ static private DataStore instance; private HashMap hm=new HashMap();
private String datakind=""; public DataStore(){}
/**
* 设置数据缓冲中的数据
* @param key 索引
*/
public void setDataStore(Object key,Object value){ hm.put(key,value); }
/**
* 获取数据缓冲中的数据类型
* @return
*/
public String getDataKind(Object key) throws Exception{
Object obj=new Object();
obj=hm.get(key); if (obj instanceof String) {
this.datakind="String";
}
else if (obj instanceof Integer) {
this.datakind="Integer";
}
else if (obj instanceof Long) {
this.datakind="Long";
}
else if (obj instanceof java.sql.Date) {
this.datakind="Date";
}
else if(obj instanceof String[][]){
this.datakind="String[][]";
}
else if(obj instanceof int[][]){
this.datakind="int[][]";
}
else if(obj instanceof int[][]){
this.datakind="float[][]";
}
else {
throw new Exception("选择的数据不是可识别类型!");
} return datakind; }
/**
* 判断数据是否存在
* @return boolean
*/
public boolean getIsExist(Object key){
return (hm.containsKey(key));
}