Campbell Ritchie

Marshal
+ Follow

Recent posts by Campbell Ritchie

Piet Souris wrote:. . . I meant empty string.

Thank you
2 days ago
Apology accepted It shows how careful you have to be when copying code.
Piet, what's a null string?
JT: please go through the Java™ Tutorials. The argument to String#split is a regular expression; it is called regex here. You will find | in the Tutorials' list of metacharacters. Plain simple “|” is interpreted as “nothing or nothing” which is why you are getting the String split into individual characters. To get a regular expression representing the upright bar or “pipe” character, you have to escape it, as Carey showed you.
3 days ago
1 2 3 4 5 6 7 8 9 0 are called “Arabic” numbers because they came to Europe from the Arabs. The concept of having those ten numbers actually originated in India.
4 days ago
Welcome to the Ranch

SP hasn't posted for two years, so he may not be able to use your product.
4 days ago

Cihangir Kuce wrote:How can I calculate the unicode value of a character in the ocp exam? . . .

I don't know whether you need to work out any Unicode numbers for a cert. exam, but for “Arabic” numbers and Latin letters, it should be very simple.
4 days ago
Welcome to the Ranch

I presume that is Boyarsky and Selikoff's book? Please give us the question number. I didn't find anything matching your point here, so you probably have a new erratum (well done).

Swapnil Mishra wrote:. . . I though It would be good to include this

Have you any idea whether that behaviour is fixed for all programs, and whether it is specified anywhere?
5 days ago
Congratulations, everybody
5 days ago

Tim Cooke wrote:You mean this one Campbell? , , ,

Yes.
6 days ago

Mike Simmons wrote:Long ago, there was a good . . . use case for that constructor. . . .

Yes, I had forgotten about that. It disappeared in Java6, just as using a static initialiser to allow you to execute code with no main method disappeared in Java7.

really just used for pointless interview questions about instances, equality, and GC.

Hahahahahahahahahahahahaha! Do they ever use it for cert. exam questions; I think not.
6 days ago