Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2
This is the forum to discuss the Wrox book Professional Android Application Development by Reto Meier; ISBN: 9780470344712
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 30th, 2008, 03:23 PM
Registered User
 
Join Date: Dec 2008
Location: Alameda, CA USA
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 2 -- To Do List -- import java.util.ArrayList?

Seems like I had to add import java.util.ArrayList; at the top of the ToDoList.java file because when I tried to run this it gave me an error, and Eclipse suggested importing this because of the use of new ArrayList<String>().

I checked the sample code from this site and it uses this import.

My question is, was that supposed to have been added automatically by Eclipse? If so, when the project was created, or when I typed in that line?

or, should this have been included in as a step in building out this example?

thanks
Reply With Quote
  #2 (permalink)  
Old December 31st, 2008, 03:49 AM
Reto's Avatar
Wrox Author
Points: 287, Level: 5
Points: 287, Level: 5 Points: 287, Level: 5 Points: 287, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2008
Location: London, United Kingdom
Posts: 61
Thanks: 1
Thanked 7 Times in 6 Posts
Default

Quote:
Originally Posted by SteveOliverC View Post
My question is, was that supposed to have been added automatically by Eclipse? If so, when the project was created, or when I typed in that line?

or, should this have been included in as a step in building out this example?
To keep the code samples in the book as concise as possible I decided not to include the import statements as a step in most of the examples. Including steps to add each import as needed cluttered up the snippets and samples in a way that seemed to detract from what I was trying to show.

The 'suggestion' feature in Eclipse makes pulling in the required imports really quick and simple, so it felt like a good compromise.

So the behaviour you're seeing is as expected -- for most examples you'll probably want to use Eclipse's mechanism for adding the import statements as you go through each step.
__________________
Reto Meier

Author, "Professional Android 4 Application Development", Wrox, ©2012, 2010, 2008
@retomeier
Reply With Quote
  #3 (permalink)  
Old April 3rd, 2009, 02:50 PM
Registered User
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In training books & materials there always seems to be a gap bewteen the initial configuration of an environment and the daily coding ritual. I definitely find it frustrating when you do "exactly" what the text describes and you encounter unexpected red flags all over the IDE; it makes you feel like you're so off base that you have no idea what you're doing.

A little blurb somewhere would be nice, for sure. I'm glad I went ahead to compare the sample code as well, but it leaves you scratching your head saying "why does his look like that?" At any rate, enjoying the book so far, on to the next chapter!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Root Cause:java.lang.NoSuchMethodError: java.util. anees81 JSP Basics 3 March 1st, 2011 08:55 AM
Chapter 2 - Import and Export Wizard example LaurieCSI BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 3 May 13th, 2008 05:17 AM
stsadm util restore exception 0x80070005 Raz Muhammad SharePoint Admin 0 July 10th, 2007 08:52 AM
problem with java.util.Date kanoorani Java Basics 1 April 20th, 2007 01:48 AM
Populating a drop down list from an ArrayList snejsnej ASP.NET 1.0 and 1.1 Basics 1 April 20th, 2006 11:14 AM



All times are GMT -4. The time now is 08:52 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.