You changed the code from the article to add in try/catch and then separated
the declaration of resultFeed from where it is used in the for loop.

Cheers,
-Jeff

On Tue, Nov 11, 2008 at 8:41 AM, Lindberg.he <[EMAIL PROTECTED]> wrote:

>
> I just try "public class CalendarTest",from "Getting Started with the
> Google Data Java Client Library" but it cannot be compiled
> it said that:
> cannot find the symbol : variable resultFeed
> location: class calendartest.CalendarTest
>        for (int i = 0; i < resultFeed.getEntries().size(); i++) {
> another message given:
>  variable resultFeed is not used
> and I have no idea
> the code is below:
>
>
> public class CalendarTest {
>        public static void main(String[] args) {
>        CalendarService myService = new CalendarService("exampleCo-
> exampleApp-1.0");
>        try{
>        myService.setUserCredentials("[EMAIL PROTECTED]", "pa$$word");
>
>        URL feedUrl = new URL("http://www.google.com/calendar/feeds/
> default/allcalendars/full<http://www.google.com/calendar/feeds/default/allcalendars/full>
> ");
>        CalendarFeed resultFeed = myService.getFeed(feedUrl,
> CalendarFeed.class);
>        }catch(Exception e){System.out.println(""); }
>        System.out.println("Your calendars:");
>        System.out.println();
>
>        for (int i = 0; i <resultFeed.getEntries().size(); i++) {
>          CalendarEntry entry = resultFeed.getEntries().get(i);
>          System.out.println("\t" + entry.getTitle().getPlainText());
>        }
>
>    }
>
>
> }
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data Protocol" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to