import java.util.*;class Person implements Comparable{ String name; int age; Person(){ name = ""; age = 0; } Person(String name, in...
分类:
编程语言 时间:
2014-07-28 14:38:03
阅读次数:
284
根据属性的实现方式,属性可分为自动实现的属性和常规属性。常规属性需要具体的人为的实现get访问器或者set访问器,而且一般需要有一个字段与之相对应;而自动实现的属性的get和set访问器的实现部分被省略掉了,而且代码中不需要有相对应的字段。常规属性: public class Person ...
分类:
其他好文 时间:
2014-07-27 23:34:29
阅读次数:
218
public class Test{ public static void main(String[] args){ Person p = new Person(); }}/*4.修饰的变量是一个常量(所有字符都大些 XXX 或者 XXX_XXX),只能赋值一次! fi...
分类:
编程语言 时间:
2014-07-27 23:33:29
阅读次数:
232
1: 首先介绍如何利用adb查看数据库1: adb shell2: cd /data/data/包名/databases3: sqlite3 数据库4 接下来就可以进行数据库的sql语法的使用了bean对象:public class Person { private int id; ...
分类:
移动开发 时间:
2014-07-27 23:07:29
阅读次数:
430
PrototypeTime Limit: 1 Second Memory Limit: 32768 KBPrototype is a 3D game which allow you to control a person named Alex with much super ability t...
分类:
其他好文 时间:
2014-07-27 11:06:42
阅读次数:
328
我们在java中
Java中初始化的顺寻?
java代码:
package sru.love.c;
class Person
{
String name = "Person";
static
{
System.out.println("我是 Person 的 static 代码块");
}
{
System.out.println("我是 Person 构...
分类:
编程语言 时间:
2014-07-26 02:56:06
阅读次数:
185
G - 中国剩余定理
Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
Some people believe that there are three cycles in a person's life t...
分类:
其他好文 时间:
2014-07-26 02:46:17
阅读次数:
292
访问者设计模式是已经有了一组Person对象了,然后不同的访问者访问这组对象,会有不同效果。
这些访问者实际上就是一个可以让Person对象组执行的动作行为等。
至于这些Person对象是如何执行这些访问者的动作的,那是已经在特定的不同的Person对象中设计好的。
比如我们的访问者也许是一些动作集合的类,如:
class Action
{
public:
string present;...
分类:
其他好文 时间:
2014-07-26 02:11:46
阅读次数:
234
今天对于内存的理解 又加深了一步:
对下面代码的理解:
class Person
{
private String name="xiaohong";
private int age=23;
private static String country="CN";
{
System.out.println(name+" "+age);
}
public Person(String...
分类:
其他好文 时间:
2014-07-26 02:11:03
阅读次数:
189
一: 执行sql语句,返回受影响的行数 在mysql里面,如果没有影响,那么返回行数为 -1 ,sqlserver 里面 还没有测试过 using (var ctx = new MyDbContext()){ ctx.Database.ExecuteSqlCommand("UPDATE Person...
分类:
数据库 时间:
2014-07-26 01:16:26
阅读次数:
406