It looks to me like the syntax error is immediately *before* the code you cite.
This isn't just a java issue. Compilers report errors when they detect things that don't make sense in the current context. But if there's something missing -- then the compiler may only notice that something is wrong when it hits something that doesn't belong yet. So look, for example, for a missing "}". If you're not using Eclipse, I highly recommend it; it will make problems a lot easier to spot. On Jan 3, 9:37 am, brahadeesh <[email protected]> wrote: > 0 down vote favorite > > Hi all, I am a beginner to android. I am trying to figure out the > errors I am getting when using the following syntax: > > protected void onActivityResult(int requestCode, int resultCode, > Intent data) { > > The following are the errors: > 1.void is an invalid type for the variable onActivityResult. > 2.Syntax error on token "," ";" expected. > 3. same as 2. > 4.Syntax error on token "(" ";" expected. > 5.Syntax error on token ")" ";" expected. > Sorry if you find this question trivial. -- You received this message because you are subscribed to the Google Groups "Android Developers" 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/android-developers?hl=en

