• Post Reply Bookmark Topic Watch Topic
  • New Topic

Newbie to Java started Head First Java (2nd Edition)  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to Java but I'm not new to OO programming. I've been programming in Python since 2003. I felt it was time to upgrade a web-based application I developed in Python that uses artificial intelligence to administer knowledge, skill, and personality-related test questions. My searching has led me to Java.

I bought Learning Java (Niemeyer & Knudsen), and after reading and doing examples in the first 400+ pages, I felt I hadn't turn the corner on anything. It had less than 10 full examples in 400 pages that I read. I stopped reading it and didn't feel comfortable to begin the process of porting over my Python code to Java .

After reading three chapters and doing the examples in Head First Java, I feel that I'm making a lot of progress! Is there a place for making comments to the book? I did the pool puzzle in Chapter 2 (p. 44) and found a solution that was exact in printing the required output, but it is not the solution provided in the book. I'm putting it here just in case, anyone runs into the same issue. If there is a more appropriate place to put it, please let me know. Thanks!

 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can submit erratas at the publisher's homepage (here for the 2nd edition)
 
Damon Bryant
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Christophe Verré wrote:You can submit erratas at the publisher's homepage (here for the 2nd edition)


Thanks!
 
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Damon
 
Damon Bryant
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seetharaman Venkatasamy wrote:Welcome to JavaRanch, Damon [/quote
Thanks, Seetharaman! I'm glad to be here. Take care!
 
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Had to Bump this

Thank you Damon came here for the same reason. Worked on the dam problem for at least an hour and was sure I got it right just to see the answer was different so I had to type it in both ways and run it myself. Stupid thing is because of this error?(loophole?) I probably learned even more than I would have had I got it right.
 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Yes, you learn more from finding errors and correcting them than looking at "correct" code.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Damon Bryant wrote:I'm new to Java but I'm not new to OO programming. I've been programming in Python since 2003. I felt it was time to upgrade a web-based application I developed in Python that uses artificial intelligence to administer knowledge, skill, and personality-related test questions. My searching has led me to Java.

I bought Learning Java (Niemeyer & Knudsen), and after reading and doing examples in the first 400+ pages, I felt I hadn't turn the corner on anything. It had less than 10 full examples in 400 pages that I read. I stopped reading it and didn't feel comfortable to begin the process of porting over my Python code to Java .

After reading three chapters and doing the examples in Head First Java, I feel that I'm making a lot of progress! Is there a place for making comments to the book? I did the pool puzzle in Chapter 2 (p. 44) and found a solution that was exact in printing the required output, but it is not the solution provided in the book. I'm putting it here just in case, anyone runs into the same issue. If there is a more appropriate place to put it, please let me know. Thanks!









can you just tell me if want to print 24 in place of 10...what should be the code..thanks.
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to coderanch Damon Bryant..
For Nabanita Sarkar The code will be very simple, we just copy the reference of e1 in new object e2.
 
Nabanita Sarkar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Piyush Chaudhary wrote:Welcome to coderanch Damon Bryant..
For Nabanita Sarkar The code will be very simple, we just copy the reference of e1 in new object e2.
Thanks for your reply..

i got to know the cod from the book...but i dint understand how does it work to print 24.

Echo e2=e1;// this statement means copy e1 to e2...so any variation in e1 should reflect in e2 as well.

So my question is :similarly variation in e2 also reflects in e1 or not...???

if not , then this code shoudn't work...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!