Marco Ulrich

+ Follow
since Oct 02, 2020
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 Marco Ulrich

There is an infinity loop. In while(hungry = true) you assign true to the hungry variable.
So the loop is the same as while(true)
Thank you for your answer.
I didn't take the test from home, I went to a Pearson Vue test center.
I live in germany. a friend of mine also did the test yesterday in another test center and the software was in fullscreen mode.
Now I know that I will never visit this test center again, it was really a handicap, even with shorter code snippets I had to scroll up and down.

I also want to tell you that your OCA book is great, I think it was the main reason I passed the test.
today i took the exam and passed it with 81 percent. Since I also want to do the OCP, I would like to know whether the following condition is normal.
The Testing Software was really small. Something like that.

on a 19 inch screen, the software on a black background. So instead of cute chicks, a black screen. I asked the guy working in the Testcenter, if he can increase the Screen of the Software. He said no, because Pearson Vue has set it that way.
I just can't imagine PearsonVue wanting the software to only take up 50% of the screen. I also read somewhere that just like in Enthuwarre Software, I could cross out possible answers, but that wasn't possible either.

Now im asking myself if i should change the Testcenter for the OCP or is it just normal.

Thanks for your Answers and sorry for my bad english ;)
Maybe that way will helps you

You have :

int y = ++x * 5 / x-- + --x;

now you put according to the level of priority step by step every expression in brackets

1. int y = ++x * 5 / (x-- )+ --x
2  int y =( ++x ) * 5 /( x-- )+(--x)
3. int y =( ( ++x ) * 5 ) /( x-- )+(--x;)
4. int y = ( ( ( ++x ) * 5 ) /( x-- ) ) +(--x;)

Now you can evulate it from left to right, if there is a bracket you have to evulate the contant first
Higher Precedence does not mean that the operation must be evulated first. It means that before you can evulate  ++x * 5, you have to evulate the ++x

So these are the steps

Campbell Ritchie wrote:

Marco Ulrich wrote:. . . the elements of arr, are int[] not ints. . . .

Afraid you are mistaken: you are using the int[] in line 2 to find the individual numbers, so that code is correct.

. . .

Since arrays don't override Object#toString(), that code won't print the elements at all. I think you shouldn't sit the exam until you have more experience.

In real life, use this method.

I think you got me wrong. I know that Arraay don`t ovverride the toString Method. Anyway the Java Specification says that the toString Method returns a String Represantation of the Object wich is Classname@hashcode. There are also these Questions with Arraylists wich inherits toString from AbstractCollection.
My point is in my opinion an Array of int arrays holds int array ,not int values. So the elements of int[][] arr, are Arrays that holds int's.
I know how to get all the numbers of the inner Arrays. But I want to know what, according to oracle, is the correct definition of an element in an array.
I don't think I'm not ready for the OCA, but if you think you should blame me for this question, feel free to do it again

Maybe you should read the Documentation that you are sharring.
Arrays deepToString

Elements are converted to strings as by String.valueOf(Object), unless they are themselves arrays.
If an element e is an array of a primitive type, it is converted to a string as by invoking the appropriate overloading of Arrays.toString(e). If an element e is an array of a reference type, it is converted to a string as by invoking this method recursively.

So the elements of multidimensional Arrays are Arrays

In the Whizlabs OCA 8 mock excams are Questions like:

What should be inserted to print all Elements of arr?

The correct Answer is something like :

in my opinion this is not correct, because the elements of arr, are int[] not ints.

So the Answer should be:

What do you think and do you have experiences with similar questions in the real Excam and what the correct answer would be?
I feel ready for the Excam. But I noticed that there are far fewer trick questions in the Ethnuware software than in the OCA Study Guide.
Normal questions about OCA topics cause me far fewer problems than questions about the output, but the real problem is that an equal(Object ) method is called instead of equals(Object o).

Since I often read the Mock Excams in the Enthuware software are very close to the real Oracle Excam and since there aren't that many trick questions and generally the code is written more cleanly, I wonder how tricky the Oracle Excam is.

Thank you