Win a copy of Head First Android this week in the Android forum!

Poyan Gerami

+ Follow
since Jul 28, 2015
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Poyan Gerami

thanks for the reply, I have worked some with j2ee , some with ejb 3, different mvc frameworks, not so much with JPA. Worked mostly with spring stack.
So don't want to learn another framework.
I want some tips witch certification I should take, I have already take "Java SE 8 Programmer" for 2 years ago. So what is my next step, I want to learn java language deeper also design patterns is interesting.  Any ideas ?

Roel De Nijs wrote:

Raghavendra Desoju wrote:It is printing the value from SuperClass not the Interface. Are there any rules defined for these kind of situations?

As you can see from your code snippet, the class definition always beats the interface version. You'll find more detailed information in this topic.

And what do you think about this code

Hope it helps!
Kind regards,

PS. I added "(OCA8 only)" to the subject of this topic to indicate this question is only appropriate if you are preparing for the OCA8 exam and OCA7 aspirants get not confused by this question. Hope that's ok with you!

it seams you get complie error when you have 2 interface classes that have same default method name and you try to implement both this interfaces in your class.
do we get paper and pen when we to the certification test on pearson ? it's good to have for writing things down in complicated questions.
my compiler just give me 1 error when compiling the code I provided.
yes you get another compile error when you remove i = "test";
But the compiler give us only 1 compile error when having both not valid statements, and the question was how many compile error does this code give. So in the exam we need to check all possible compile errors.
this test give me just one error: error: cannot assign a value to final variable i
i = "test";
1 error
Is it possible to go back to result page for an chapter test ? I have started with an new chapter but want to review my answers from previous chapter, can't find it
6 years ago
it should be 3 compile errors ?
"variable bench might not have been initialized"

they have count line 4 and 15 as compile errors, should be just line 4 ?
chapter 4, question 18
in sybextestbanks

option G , main method can call private constructor , should be , main method can call private method ?
thanks, butt still I think System.currentTimeMillis() is an easier way to get epoch time.
in chapter 3 page 146

LocalDateTime has toEpochTime() , can't find this method at all, the way i found to get the seconds is like this:

LocalDateTime time =;
ZoneId zoneId = ZoneId.systemDefault();
long epoch = time.atZone(zoneId).toEpochSecond();

Is it any way to get it in miliseconds, same value as the old way new java.util.Date().getTime() ??
chapter 3, page 123
Using an Array
for loop does not throw ArrayIndexOutOfBoundsException , condition in for loop shouled be '<=' ?


My fault you mean the for loop in page 124 throws ArrayIndexOutOfBoundsException, thats correct. Sometimes in the book you refers to code after the text and sometimes before, that should be more clear.