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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
ETS User

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

Post by ETS User »

Hi everyone!

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

Thanks in advance.

ETS User

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

Post by ETS User »

There isn't space in the box?

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

Karen

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

Post 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

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

I have made a list here as well.

Sunkrop

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

Post 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".

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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

baptize
Posts: 32
Joined: Wed Mar 14, 2012 5:45 pm
Contact:

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

Post 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.

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

baptize
Posts: 32
Joined: Wed Mar 14, 2012 5:45 pm
Contact:

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

Post 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?
Attachments
Screen Shot 2013-04-21 at 12.11.35 PM.png
Screen Shot 2013-04-21 at 12.11.35 PM.png (28.16 KiB) Viewed 7015 times

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

Hi,
It seems it is updated in the book as well. I can see that in the book on kindle.
-Paul.

lawfanatic
Posts: 1
Joined: Fri Dec 20, 2013 9:47 am
Contact:

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

Post 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


vchhang
Posts: 36
Joined: Tue May 06, 2014 8:30 am
Contact:

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

Post by vchhang »

I don't understand how b2.substring(2,5) = keeps the value unchanged in column 2, row 1.

vchhang
Posts: 36
Joined: Tue May 06, 2014 8:30 am
Contact:

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

Post by vchhang »

nevermind.. I got it now. substring does not modify the object's value.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests