in which file we write code in android
\

Your question doesn't make sense. Project basic structure is usually generated by IDE or by Ant if you know how.

  • Project
    • src (java files)
    • res (folder containing resources drawable, animation, layout, menu, values etc)
    • AndroidManifest.xml

Is there any ide that could be used to make Java files for Android? It would be nice if you could test it out using the ide, if not then if there would be an Android emulator it would also be nice.

Is there any ide that could be used to make Java files for Android? It would be nice if you could test it out using the ide, if not then if there would be an Android emulator it would also be nice.

As mentioned in this post from Starting mobile development on top of the section, there are IDEs (Eclipse and IntelliJ)