码迷,mamicode.com
首页 >  
搜索关键字:class    ( 183544个结果
isKindOfClass isMemeberOfClass 的区分
isKindOfClass:returns YES if the receiver is an instance of the specified class or an instance of any class that inherits from the specified class.isM...
分类:其他好文   时间:2015-05-13 12:33:37    阅读次数:86
基础知识:Java网络编程
用TCP通信模型创建一个web服务器 主要用ServerSocket 一直监听,这里将其放到while循环中,在循环体内单开一个线程 public class MyWebServer { public static void main(String[] args) throws IOExceptio...
分类:编程语言   时间:2015-05-13 12:23:06    阅读次数:189
Palindrome Number
public class Solution { public boolean isPalindrome(int x) { if (x < 0) { return false; } return x == reverse(x); ...
分类:其他好文   时间:2015-05-13 12:19:59    阅读次数:68
ArrlyList集合
public class Person{ private String name;//,sex; private int age; public Person(String name, int age) { super(); this.name =...
分类:其他好文   时间:2015-05-13 12:16:11    阅读次数:119
基于公司级平台封装的SqlserverHelper
1 public class DBHelper 2 { 3 /// 4 /// 数据库帮助 5 /// 6 protected static DbHelper db = null; 7 8 9 ...
分类:数据库   时间:2015-05-13 12:04:24    阅读次数:116
merge sort
算法导论–第二章 merge sort java代码实现 1 public class Sort { 2 public static void main(String[] args){ 3 int[] arr = new int[]{8,30,19,1,45,...
分类:其他好文   时间:2015-05-13 12:01:06    阅读次数:95
【C++】派生类对象初始化基类的引用
//派生类对象初始化基类的引用 //引用是别名,但这个别名只能包含派生类对象中的由基类继承来的隐藏对象 #include using namespace std; class B { public: B() { cout<<"B"<<endl; } void fun() { cout<<"B::fun()"<<endl; } private: int x; }; cla...
分类:编程语言   时间:2015-05-13 10:40:21    阅读次数:241
【C++】通过基类的指针变量访问派生类中由基类继承来的隐藏对象
// // 可以将一个派生类的对象的地址赋给其基类的指针变量,但只能通过这个指针访问派生类中由基类继承来的隐藏对象, //不能访问派生类中的新成员。同样也不能反过来做。 #include using namespace std; class B { public: B() { cout<<"B"<<endl; } void fun() { cout<<"B::fun()"<<...
分类:编程语言   时间:2015-05-13 10:40:20    阅读次数:162
【C++】探究类派生时构造函数的顺序
//探究类派生时构造函数的顺序 //在派生类对象的创建中,首先是虚基类的构造函数并按它们声明的顺序构造。 //第二批是非虚基类的构造函数按它们声明的顺序调用。 //第三批是成员对象的构造函数。最后是派生类自己的构造函数被调用 #include using namespace std; class B { public: B() { cout<<"B"<<endl; } int x;...
分类:编程语言   时间:2015-05-13 10:40:14    阅读次数:109
【C++】继承派生中对象相互赋值情况
//继承派生中对象相互赋值情况 //派生类的对象可以赋值给基类的对象,这时是把派生类对象中从对应基类中继承来的隐藏对象赋值给基类对象。 //反过来不行,因为派生类的新成员无值可赋。 #include using namespace std; class B { public: B() { cout<<"B"<<endl; } void fun() { cout<<"B::fu...
分类:编程语言   时间:2015-05-13 10:39:31    阅读次数:141
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!