文章列表
declare test_cursor cursor scroll for select id from member
open test_cursor
declare @id int
while @@FETCH_STATUS=0
begin
print @id
update member set mobile = cast(rand()*100000000000 as bigint) where id=@id ;
fetch next from test_cursor into @id
end
close test_cursor
deallocate test_cursor
1.内部类可以作为一个帮助类实现:
public class DataStructure {
// create an array
private final static int SIZE = 15;
private int[] arrayOfInts = new int[SIZE];
public DataStructure() {
// fill the array with ascending integer values
for (int i = 0; i < SIZE; i++) {
...
嵌套类
1.在Java中如下形式一个类里面包含的类称之为嵌套类
例子:
class OuterClass {
...
class NestedClass {
...
}
}
2.嵌套类分为2类:
1.静态嵌套类
2.非静态嵌套类(又称为内部类)
嵌套类是它的封装类的成员变量。非静态嵌套类(内部类)可以访问它封装类的其他所有成员变量(包括private的);静态嵌套类不能访问它封装类的其他成员变量。就像类OuterClass中的成员变量一样,嵌套类可以声明为 private 、 protected、pu ...