代码public class Test { public static void main(String[] args) { Shape shape = new Circle(); System.out.println(shape.name); sh...
分类:
编程语言 时间:
2015-05-09 23:35:52
阅读次数:
142
抽象的概念就是抽象出共同属性:成员变量和方法定义抽象使用abstract关键字定义抽象类和方法抽象类abstract class 包含抽象方法的类,叫抽象类。所以抽象类可以有private等多种权限的成员变量和非abstract的成员方法。当然抽象方法是一定要有的。抽象类是用于单一继承的,不能实例化...
分类:
编程语言 时间:
2015-05-09 23:35:10
阅读次数:
145
class MyThreadScopeData { // 单例 private MyThreadScopeData() { } // 提供获取实例方法 public static synchronized MyThreadScopeData getThreadInstance() { // 从当前....
分类:
其他好文 时间:
2015-05-09 23:34:45
阅读次数:
120
书上没有那段代码,我自己修修补补弄完全了呢。。。。就是感觉体系有点宏大,不要急,慢慢玩~!~~这个世界很精彩哟~~: QuizCard.javapackage QuizCard.sky.com;public class QuizCard { private String qStr; ...
分类:
编程语言 时间:
2015-05-09 23:34:31
阅读次数:
233
1. word ladder 1 class Solution 2 { 3 public: 4 int ladderLength(string beginWord, string endWord, unordered_set &wordDict) 5 { 6 queu...
分类:
其他好文 时间:
2015-05-09 23:32:41
阅读次数:
133
#includeclass shape {public: int a; shape(int t) { a=t; } virtual void area()=0;};class circle: public shape { public: void area(); circl...
分类:
其他好文 时间:
2015-05-09 23:24:25
阅读次数:
134
1 import java.util.*; 2 3 public class BasicGeneric { 4 public static void main(String[] args) { 5 List c = new ArrayList(); 6 c...
分类:
编程语言 时间:
2015-05-09 23:23:43
阅读次数:
219
如何使用jquery,首先需要引入jquery的js库文件,可以是免费的cdn资源,也可以是本地下载的资源 使用方法:$(function(){ 这里面写你要执行的代码,例如下面的例子 最好写到这个里面、 }) 1、对html元素添加事件 //选择器可以是 标签 、class名称 、 id名称 、....
分类:
Web程序 时间:
2015-05-09 23:22:54
阅读次数:
183
#includeclass shape {public: int a; shape(int t) { a=t; } virtual void area() { cout<<"shape\n"; }};class circle: public shape {...
分类:
其他好文 时间:
2015-05-09 23:21:50
阅读次数:
118
代码public class Test { public static void main(String[] args) { new Circle(); }} class Draw { public Draw(String type) { S...
分类:
编程语言 时间:
2015-05-09 23:16:38
阅读次数:
202