Labels

Learn the powerful enterprise adaptable database:

Getting Started With ADABAS & Natural

Wednesday, February 13, 2013

Learning Java For Android 1



Summary:
This tutorial guides the reader to use Android Developer Tools version of Eclipse for Java Programming Essentials needed for Android Development.

1) Download ADT from http://developer.android.com/sdk/index.html
1.1) Click the button "Download the SDK ADT Bundle for Windows"
1.2) Extract the file to a proper location. ( e.g c:\z\dev )


2) Run Eclipse
2.1) Locate Eclipse program as shown in the below screenshot.


2.2) ADT Splashscreen would pop up for few seconds


2.3) You will be asked for a workspace (place where you keep your programming project files).
The ideal location is "..\workspace" (the workspace folder is located at the same level of eclipse folder)
Optionally tick "Use this as the default and do not ask again".
Click OK.



2.4) Your Eclipse will be preloaded with Android Welcome Page.


2.5) Close the Android Welcome page.
You will get the standard Window Perspective for Java Programming.


3) Creating Hello World program.
3.1) Click File/New/Java Project.


3.2) In Project Name textbox, type "MyFirstProject"
Click Finish.


3.3) MyFirstProject folder appears in Package Explorer.


3.4) Explode MyFirstProject folder. Click "src" folder.


3.5) Right-click "src", context menu appears, click New/Class.


3.6) In Java Class Name textbox, Type "Hello World". Click Finish.


3.7) HelloWorld is ready for editing.
3.7.1) The file containing Hello World codes is called HelloWorld.Java
3.7.2) The first code group ready for editing is called HelloWorld Class which is a Public type.


3.8) Editing and running Hello World.
3.8.1) Type the following codes:

public class HelloWorld {
public static void main(String[] args){
System.out.println("Hello,world!");
}
}



3.8.2) Locate the Run Button.
Click the Down Arrow besides the Run Button.
Select Run as Java Application.


3.8.3) The program sends the output to the Console Tab.
Notice the "Hello,world!" text appears in Console Tab.

2 comments:

  1. If you want to learn Java, I would suggest that you visit https://netbeans.org/kb/trails/java-se.html. The website contains everything you need to start learning Java. All the best!

    ReplyDelete
  2. Hi heena,
    I have no idea about this online java training course you are talking about but i have taken many other courses from http://www.wiziq.com which has worked for me . It is really cool stuff which they provide like videos,notes,cd's and also the teachers are also good. So even i was planning to learn java so now when i came across ur comment even i have enrolled in http://www.wiziq.com/course/12145-the-6-week-complete-java-primer-with-training-certificate because i have studied from this site before also so i have faith on this one...

    ReplyDelete