上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 19 下一页
摘要: 1 import java.util.TreeSet; 2 3 4 /** 5 * PriorityQueue, TreeSet是排序集合,存储的对象必须实现Comparable接口。 6 * 原因是: Comparable 接口定义了compareTo()方法,它判断类的对象的“自然顺序... 阅读全文
posted @ 2014-05-14 08:54 soul390 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.Arrays; 2 import java.util.Comparator; 3 4 class ResStrSort{ 5 public static void main(String[] args) { 6 String strs... 阅读全文
posted @ 2014-05-13 19:58 soul390 阅读(435) 评论(0) 推荐(0) 编辑
摘要: struts配置文件中的package name属性不是解决重名问题的,而是用来实现继承的,namespace才是用来解决重名的,前台和后台可以这样分,这样在两个包里都有test Action时在url地址中用/front/test或/back/test就能区分开了,另外继承时用extends="f... 阅读全文
posted @ 2014-05-05 16:30 soul390 阅读(116) 评论(0) 推荐(0) 编辑
摘要: web应用的结构: web.xml classes diegoyunOutputTag.class WEB-INF src diegoyunOutputTag.javamytag tlds diego.tld tag.jsp细节... 阅读全文
posted @ 2014-05-04 11:08 soul390 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 共有继承(public),私有继承(private),保护继承(protected):1.public继承:基类成员类型 作为派生类成员在派生类中是否可见对派生类对象的可见性publicpublic可见可见protectedprotected可见不可见private--不可见不可见2.private... 阅读全文
posted @ 2014-04-26 16:31 soul390 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 创建线程的两个方法:1.继承Thread类:1 public class 类名称 extends Thread{2 //构造方法3 public 类名称(){4 }5 //重写Thread类里面的run()方法6 pu... 阅读全文
posted @ 2014-04-21 19:35 soul390 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 继承是子类自动地共享父类中定义的数据和方法的机制。子类还可以定义自己的方法和属性,子类可以覆盖从父类继承来的方法,并为这些方法提供特殊化的实现。 阅读全文
posted @ 2014-04-21 19:09 soul390 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 1 ConnectivityManager manager = (ConnectivityManager) this2 .getSystemService(Context.CONNECTIVITY_SERVICE);3 NetworkInfo info = manager.g... 阅读全文
posted @ 2014-04-21 10:35 soul390 阅读(88) 评论(0) 推荐(0) 编辑
摘要: char* ss="0123456789";sizeof(ss) = 4; ss是指向字符串常量的字符指针sizeof(*ss) = 1;char ss[]="0123456789";sizeof(ss) = 11; ss数组,计算到“\0”位置sizeof(*ss) = 1;char ss[100... 阅读全文
posted @ 2014-04-17 10:15 soul390 阅读(120) 评论(0) 推荐(0) 编辑
摘要: (int)a、&a、(int)&a、(int&)a的区别,很偏僻的题#include #include #include #include using namespace std;int main(){float a = 1.0f;cout <<sizeof(int) <<endl;//4cout ... 阅读全文
posted @ 2014-04-16 14:37 soul390 阅读(322) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 19 下一页