• Post Reply Bookmark Topic Watch Topic
  • New Topic

Pool puzzle "Echo Test Drive" of Head First Java  RSS feed

 
Nabanita Sarkar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone help me to solve the bonus question of Pool Puzzle "echo Test Drive in Head First java 2nd Chapter.

Output shoud be:

%java EchoTestDrive
helloooo...
helloooo...
helloooo...
helloooo...
24


The code is here...u have to fill the blanks:
 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The solution is in the book; do you have specific questions about it?


It won't, unless e1 is set. Part of the given code is Echo e1 = new Echo(); which you left out of your code. There are other "given" parts that are missing.

This needs a semicolon (;) at the end.

Also, be sure to UseCodeTags (← that's a link) and indent. It's much easier to read and you're more likely to get an answer to your question. I'll do it for you this time.
 
Piyush Chaudhary
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Very Simple, We just Copy the reference of e1in echo2...


I had replied in your another topic also where did you ask the same question..
 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Piyush Chaudhary wrote:A Very Simple, We just Copy the reference of e1in echo2...


We try not to give complete solution in this forum, but since the solution is in the book, I'll let it stand. Just FYI next time.

I had replied in your another topic also where did you ask the same question..


Nabanita, you shouldn't post the same question in two different threads. If the thread was there before, it's gone now.
 
Piyush Chaudhary
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay,, I'll take care of it from next time...
 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didn't mean to make you sad. We're just trying not to be a code mill.
 
Piyush Chaudhary
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
O.k.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!