Mikalai Zaikin

+ Follow
since Jun 04, 2002
Merit badge: grant badges
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

Recent posts by Mikalai Zaikin

Hi !

You probably read some old postings, because OCP Java 11 certification initially consisted of two 1Z0-815 and 1Z0-816 exams.

Then in 2020 Oracle replaced them with just one exam: 1Z0-819.

You should refer this link for the list of topics: https://education.oracle.com/java-se-11-developer/pexam_1Z0-819

Welcome Brian!
Any more or less modern PC will work, as long as you can boot Windows 10 OS, you are good.
Java SE does not require much memory or fast CPU.
Sorry to hear that.
In the past I heard this failure may happen if you have some background application running and which Oracle software unable to kill.
In particular in was DropBox syncing application. Would be better have a clean OS without much software. I know it's too late to give such advice. ;(
I think it's more English language area
"at most one" means "not more than one" (IMHO)
and "one" falls into this category
I would say there is a big difference between stream and stream pipeline ;)
Stream is an approach to access data stored in some backed storage (collection, file, generator)
Pipeline -- consists of a stream, zero or more intermediate operation, and exactly one terminal operation.

Greg Charles wrote:I'm curious where you're getting that snippet from though?

It's from IDE debugger 8-)
Yes, the fourth line is blank
It's not because of println
The new line after "b" is surely counted, and length supposed to be 6

[UPDATE] After re-reading I see you also mentions "space before a"
There is no space before a, it removed as the c is on the same position.
The plain string is like that: "a\n[space]b\nc"
I may be wrong, but my understanding is: each operand is evaluated from left to right

So it will be like

4 (x pre-incremented and evaluated to 4 and x=4 after that) * 5 / 4 (evaluated to 4, and x=3 after post decrement) + 2 (as x=3 and pre-decremented before evaluating, and x = 2 after that)

which gives

4 * 5 / 4 + 2 = 7

and x = 2 (basically 3, incremented once, decremented twice)
Stephan I think you're wrong, and Albert is right.
This is a common mistake, string pool stored in Java heap memory starting with Java 7, and here 4 objects are eligible.
Is the D mentioned as correct option in the explanation?
If yes -- then probably this is an error.
No, it's simply a final variable.

You can refer JLS, let me do it for you:

A constant variable is a final variable of primitive type or type String that is initialized with a constant expression

Hi Hasan:

In short, this is compile time constant (compiler can determine it's value at compile time and it won't change):

final int i = 1;

this is also a compile time constant (in the context of the declared 'i' above):

final int j = i + 1;

this is not compile time constant, as the method may return anything :

final int k = j + getSomeValue();

For more details: please check here
Hi Gerardo !

Welcome to CodeRanch !

In the constructor:

x is initially 10 (passed in from the main method)
then x is reassigned 4
then end is assigned 4 and stored as final instance variable

The rest should be clear.

It's a bad practice reassign passed in parameters, and you can declare them final in method declaration to avoid such problems, but the exam is not about good coding style, it may show you horrible tricky code which you will never want to use in your work.