- 浏览: 100618 次
最新评论
-
luanloveni:
请问下共享session模式下,用户的不重复登录,先进先出,踢 ...
利用redis同步登陆实现session共享 -
aliucy:
属性重名是什么意思啊
No result defined for action com.daigou.controller.action.UserAction and result -
sgq0085:
Shiro有自己的ShiroSession 看我的帖子吧htt ...
利用redis同步登陆实现session共享 -
FeiXing2008:
shiro用web的session,然后在容器上配置Sessi ...
利用redis同步登陆实现session共享 -
qq466862016:
用到java了 又用到了spring 可以看下 spring- ...
利用redis同步登陆实现session共享
文章列表
1.
//@OneToMany(cascade={CascadeType.REFRESH,CascadeType.MERGE},fetch = FetchType.LAZY, mappedBy = "industry") 这里的一对多必须设置@JoinColumn跟多对一里的字段一致,而不设置mappedBy。
@OneToMany(cascade={CascadeType.REFRESH,CascadeType.MERGE},fetch = FetchType.LAZY)
@JoinColumn(name = "INDUST_ID")
pri ...
面所有SCJP的真题,现在给大家提供下载,包括以前发布真题时所遗漏的一些图片(二)
整理前面所有SCJP的真题,现在给大家提供下载,包括以前发布真题时所遗漏的一些图片
QUESTION 106
Given:
What is the appropriated definition of the hashCode method in class Person?
A. return super.hashCode();
B. return name.hashCode() + age * 7;
C. return name.hashCode() + comment.hashCode() / 2;
D. return name.hashCode() + comment.hashCode() / 2 - age * 3;
QUESTION 101
Given:
What creates the appropriate DateFormat object and adds a day to the Date object?
A. 35. Dateformat df = Dateformat.getDateFormat();
42. d.setTime ( (60 * 60 * 24) + d.getTime());
B. 35. Dateformat df = Dateformat.getDateInstance();
42. d.setTime ( (1000 * 6 ...
QUESTION 96
Given:
What is the result?
A. Compilation fails
B. Pi is approximately 3.
C. Pi is approximately 3.141593.
D. An exception is thrown at runtime.
Answer: ( D )
%d
QUESTION 91
Given a method that must ensure that its parameter is not null:
What, inserted at line 12, is the appropriate way to handle a null value?
A. assert value = = null;
B. assert value != null, "value is null";
C. if (value = = null) {
throw new AssertionException(&quo ...
QUESTION 86
Given:
What is the result?
A. A, B, C
B. B, C, A
C. Compilation fails
D. The code runs with no output
E. An exception is thrown at runtime
QUESTION 81
Given:
and two separate command line invocations:
java Yippee
java Yippee 1 2 3 4
What is the result?
A. No output is produced.
1 2 3
QUESTION 76
A class games.cards.Poker is correctly defined in the jar file Poker.jar. A user wants to execute the main method of Poker on a UNIX system using the command: Java games.cards.Poker
What allows the user to do this?
A. put Poker.jar in directory /stuff/java, and set the CLASSPATH t ...
QUESTION 71
Given:
A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap.
Which two methods should be overridden to assure that key works correctly as a key? (choose two)
A. public int hashCode ( )
B. public Boolean equals (Key k)
C. public ...
QUESTION 66
Given a pre-generics implementation of a method:
Which three changes must be made to the method sum to use generics? (choose three)
A. remove line 14
B. replace line 14 with "int i = iter.next ( ); "
C. replace line 13 with "for ( int i : intList ) {"
...
QUESTION 61
GIVEN THE EXHIBIT:
Which statement is true?
A. All of the assert statements are used appropriately.
B. Only the assert statement on line 31 is used appropriately
C. The assert statements on lines 29 and 31 are used appropriately
D. The assert statements on lines 26 and ...
QUESTION 51
Given the exhibit:
Which two statements are true? (choose two)
A. Certkiller.beta ( ) is a valid invocation of beta ( )
B. Certkiller.alpha ( ) is a valid invocation of alpha ( )
C. method beta ( ) can directly call method alpha ( )
D. method alpha ( ) can directly call me ...
QUESTION 46
1.public class Test{
2. int x = 12;
3. public void method(int x ){
4. x += x;
5. System.out.println( x);
6. }