subject topic:
1, hashMap ,
HashMap hasmap = new HashMap();
hasmap.put("1","one");
hasmap.put("2","two");
hasmap.put("3","three");
....
hasmap.put("100","one hundred");
how to remove all items in hasmap whose key is less than 100?
answer:
for(Iteroter i = hashmap.keySet().iterator();it.hasNext();){
Object o = i.next();
int key = (int) o;
...
}
Iterator i = hashmap.EntrySet().iterator();
while(i.hasNext()){
Map.Entry<int, String> e = i.next();
int key = e.getKey();
...
}
2,what's the purpose of finalization?
The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected. For example, closing a opened file, closing a opened database Connection.
3,what's the difference between box and unboxing in c#?
Boxing refers to a conversion from a non-nullable-value type to a reference type or conversion from a non-nullable-value type to some interface it implement.For example:
int i = 2;
Object o = i
Unboxing refers to a explicit conversion from a value type or Object type to a non-nullable type, or from some interface to non-nullable type.For example:
Object o = (int) 5;
int i = (int) o;
4,what is singleton design pattern?
singletion pattern is to resrict instantiation a class to only one object. It's useful when it only needs one object to coordinate the system. In singleton pattern, there just one oject of the class, and only the class itself could create oject.
5,what is the diference between static variance and global variance?
static variance is initialize once when it come into the program, if it's a static variance in a funtion, it's local variance, it only could be seen in the function; if it's a static variance in class, it could be share by all objects of the class.
Global variance could be seen by all in the program, not just in one function and one class.
6, what's stored procedure, and how to use?
Stored procedure is a subroutine available for applications to access rational database system. Stored procedures are actuall stored in database data dictionary.
It is use by call statement or execute statement:
call procedure(parameters);
execute procedure(parameters);
7,what's the differences between clustered index and non-clustered inedex?
8,what's heap and stack, and what's their differences? what goese on them?
multichoice:
1, stable and unstable algorithm?
2, A method repeatedly call itselt, what's it ?
A, Iterative, B,Recursive,C,Discursive, D,Looping
3, String A,B,C A= new... , B+A;C=A+B, how many object have been created?
4,wait, sleep, notify, lock ?
5, Mutex, AutoResetEvent, ManulResetEvent in .Net
6, new Myobject[100];
1, hashMap ,
HashMap hasmap = new HashMap();
hasmap.put("1","one");
hasmap.put("2","two");
hasmap.put("3","three");
....
hasmap.put("100","one hundred");
how to remove all items in hasmap whose key is less than 100?
answer:
for(Iteroter i = hashmap.keySet().iterator();it.hasNext();){
Object o = i.next();
int key = (int) o;
...
}
Iterator i = hashmap.EntrySet().iterator();
while(i.hasNext()){
Map.Entry<int, String> e = i.next();
int key = e.getKey();
...
}
2,what's the purpose of finalization?
The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected. For example, closing a opened file, closing a opened database Connection.
3,what's the difference between box and unboxing in c#?
Boxing refers to a conversion from a non-nullable-value type to a reference type or conversion from a non-nullable-value type to some interface it implement.For example:
int i = 2;
Object o = i
Unboxing refers to a explicit conversion from a value type or Object type to a non-nullable type, or from some interface to non-nullable type.For example:
Object o = (int) 5;
int i = (int) o;
4,what is singleton design pattern?
singletion pattern is to resrict instantiation a class to only one object. It's useful when it only needs one object to coordinate the system. In singleton pattern, there just one oject of the class, and only the class itself could create oject.
5,what is the diference between static variance and global variance?
static variance is initialize once when it come into the program, if it's a static variance in a funtion, it's local variance, it only could be seen in the function; if it's a static variance in class, it could be share by all objects of the class.
Global variance could be seen by all in the program, not just in one function and one class.
6, what's stored procedure, and how to use?
Stored procedure is a subroutine available for applications to access rational database system. Stored procedures are actuall stored in database data dictionary.
It is use by call statement or execute statement:
call procedure(parameters);
execute procedure(parameters);
7,what's the differences between clustered index and non-clustered inedex?
8,what's heap and stack, and what's their differences? what goese on them?
multichoice:
1, stable and unstable algorithm?
2, A method repeatedly call itselt, what's it ?
A, Iterative, B,Recursive,C,Discursive, D,Looping
3, String A,B,C A= new... , B+A;C=A+B, how many object have been created?
4,wait, sleep, notify, lock ?
5, Mutex, AutoResetEvent, ManulResetEvent in .Net
6, new Myobject[100];