Page 1 of 1

About Question enthuware.ocajp.i.v7.2.1302 :

Posted: Wed Oct 08, 2014 11:51 pm
by chipchipchonkeykonky
This question looks so specific. Do questions like this (requiring to know exact functionality of methods from API Classes) are common in exam OCAJP?

Re: About Question enthuware.ocajp.i.v7.2.1302 :

Posted: Thu Oct 09, 2014 1:57 am
by admin
Yes, you will get some questions that require precise knowledge of some key classes and some of their methods. They are all covered in our questions. You don't need to worry about the rest.

Re: About Question enthuware.ocajp.i.v7.2.1302 :

Posted: Thu Oct 09, 2014 5:43 am
by chipchipchonkeykonky
admin wrote:Yes, you will get some questions that require precise knowledge of some key classes and some of their methods. They are all covered in our questions. You don't need to worry about the rest.
Your questions are sometimes hard, and this is good for practices.

Re: About Question enthuware.ocajp.i.v7.2.1302 :

Posted: Thu Mar 18, 2021 8:39 am
by f.motta
If you do System.out.println(sb); it will indeed print "12345     " (without quotes) but the length will be 10.
I dit but it printed just "12345" with no blank spaces. something changed on Java 8?

Re: About Question enthuware.ocajp.i.v7.2.1302 :

Posted: Thu Mar 18, 2021 10:01 am
by admin
Try printing this : System.out.println("\""+sb+"\"");
to know exactly what does sb contain.

Re: About Question enthuware.ocajp.i.v7.2.1302 :

Posted: Fri Mar 19, 2021 5:18 am
by f.motta
Thank you Paul, the problem was that I was using an IDE(IntelliJ), and the output is different I don't know why.

I agree Know that is better don't use IDE for studying :D