Page 1 of 1

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

Posted: Sat Aug 25, 2012 11:01 pm
by ETS User
Hi everyone!

I don't understand the third statements. I don't know why contents of b1.

Thanks in advance.

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

Posted: Sat Aug 25, 2012 11:10 pm
by ETS User
There isn't space in the box?

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

Posted: Sun Aug 26, 2012 5:03 am
by admin
In the third case:

b2.substring(4) => "yoodler".substring(4) => "ler"

b1.replace(3, 4, b2.substring(4)) => b1.replace(3, 4, "ler") => "snorkler".replace(3, 4, "ler") =>snolerkler

b2.append(false) => "yoodlerfalse"

b1.replace(3, 4, b2.substring(4)).append(b2.append(false)) =>"snolerkler".append("yoodlerfalse") => snolerkleryoodlerfalse

HTH,
Paul.

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

Posted: Sun Sep 02, 2012 11:10 pm
by Karen
Is there a definitive subset of String/StringBuffer/ArrayList methods we have to know? I don't
think it's feasible to learn all of them (for me, at least).

If not, is there a probable subset?

Thanks,
Karen

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

Posted: Mon Sep 03, 2012 6:09 am
by admin
Yes, you need to learn about :

substring
replace
charAt
indexOf
length
toLower/UpperCase
compareTo
equals
equalsIgnoreCase
contains
endsWith
startsWith
valueOf
trim

Almost all are very straightforward and their names tell you what they do.

HTH,
Paul.

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

Posted: Mon Sep 03, 2012 6:57 am
by admin
I have made a list here as well.

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

Posted: Sun Mar 17, 2013 4:22 am
by Sunkrop
In the book there is a wrong answer for b1 for the third row of table.
It is "olerkleryoodlerfalse", but should be "snolerkleryoodlerfalse".

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

Posted: Sun Mar 17, 2013 9:30 am
by admin
Hi sunkrup,
You are right. The size of the textbox is a little smaller than the word and that is why the beginning two letters are not being displayed in the image. This has now been updated.

thank you for your feedback.
Paul

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

Posted: Sat Apr 20, 2013 2:14 pm
by baptize
admin wrote:Hi sunkrup,
You are right. The size of the textbox is a little smaller than the word and that is why the beginning two letters are not being displayed in the image. This has now been updated.

thank you for your feedback.
Paul
Hi Paul,
I'm using the kindle version and i still have the small box with the missing character, any idea how to update?

Thanks.

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

Posted: Sat Apr 20, 2013 6:35 pm
by admin
Hi Babtize,
I am not sure how the update works with Amazon. May be you can delete your copy from your device and redownload it?
-Paul.

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

Posted: Sun Apr 21, 2013 11:14 am
by baptize
admin wrote:Hi Babtize,
I am not sure how the update works with Amazon. May be you can delete your copy from your device and redownload it?
-Paul.
I have automatic update turned on but haven't seen any updates?

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

Posted: Sun Apr 21, 2013 11:24 am
by admin
OK, let me investigate this and get back to you. I will also need to contact Amazon about it so it might take some time.

HTH,
Paul.

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

Posted: Sat May 04, 2013 10:48 am
by admin
Hi,
It seems it is updated in the book as well. I can see that in the book on kindle.
-Paul.

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

Posted: Fri Dec 20, 2013 1:08 pm
by lawfanatic
For b1.replace(3,4,b2.substring(4)).... it seems that the method b1.replace takes 3 parameters which are 3, 4, and b2.substring(4)-> ler. What does the second parameter, the 4 in this instance, mean? What does this method look like? I can't seem to find in API. The only two I see in API are:

1. replace(char oldChar, char newChar)
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.

2. replace(CharSequence target, CharSequence replacement)
Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence.

Thank you

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

Posted: Fri Dec 20, 2013 2:08 pm
by admin

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

Posted: Fri May 23, 2014 10:16 am
by vchhang
I don't understand how b2.substring(2,5) = keeps the value unchanged in column 2, row 1.

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

Posted: Fri May 23, 2014 10:17 am
by vchhang
nevermind.. I got it now. substring does not modify the object's value.