const和readonly经常被用来修饰类的字段,两者有何异同呢? const 1、声明const类型变量一定要赋初值吗?--一定要赋初值 public class Student { public const int age; }生成的时候,会报如下错:正确的应该这样写:public class...
分类:
其他好文 时间:
2014-07-16 22:54:43
阅读次数:
166
/** * Created by rabbit on 2014-07-10. */ abstract class student { public abstract void study(); public abstract void sleep(); } class Ba...
分类:
其他好文 时间:
2014-07-16 21:45:12
阅读次数:
153
现在假设有一个Student类,内有id,name,age属性String hql = "from Student s";按照以前的做法,我们通常是Query query = session.createQuery(hql);或者要按照条件检索的话.String hql = "from Studen...
分类:
系统相关 时间:
2014-07-16 21:21:26
阅读次数:
334
#includevoid main(){const int count = 5;//定义数量struct student{char name[80];float math,eng;float aver;}stu[count],temp;//输入for (int i = 0; i stu[sub].a...
分类:
编程语言 时间:
2014-07-14 21:23:30
阅读次数:
247
1 #include // 预处理命令 2 using namespace std; 3 4 class Student{ // 声明一个类,类名为Student 5 6 private :...
分类:
编程语言 时间:
2014-07-13 19:51:57
阅读次数:
174
1、错误描述
2014-7-13 17:20:50 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [jsp] in context with path [/FirstSSH] threw exception [/pages/student.jsp (line: 3, c...
分类:
Web程序 时间:
2014-07-13 18:12:48
阅读次数:
251
1、错误描述
2014-7-13 2:38:54 org.apache.jasper.compiler.TldLocationsCache tldScanJar
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete l...
分类:
移动开发 时间:
2014-07-13 16:45:04
阅读次数:
294
#pragma once#include "student.h"#include "Teacher.h"typedef enum _EPersonType{ ePersonUndefin = 0, ePersonStudent, ePersonTeacher}EPersonType...
分类:
其他好文 时间:
2014-07-13 00:36:51
阅读次数:
216
动态链表的建立,输出,删除,插入
#include
#include
#include
#define NULL 0
#define LEN sizeof(struct student)
struct student
{
long num;
float score;
struct student*next;
};
int n;/*n为全...
分类:
其他好文 时间:
2014-07-12 23:23:33
阅读次数:
183
经验:"public继承"意味 is-a。适用于 base classes 身上的每一件事情一定也适用于 derived classes 身上,
因为每一个 derived classes 身上,因为每一个 derived class 对象也都是一个 base class 对象。
示例:
class Person {...};
class Student: public Person {...};
void eat(const Person &p); //任何人都会吃
void study(const ...
分类:
编程语言 时间:
2014-07-12 21:18:25
阅读次数:
230