Film izle Sinema izle Bayan Azdirici Bayan Azdirici Damla Azdirici Geciktirici Sprey Geciktirici porno sex travesti cialis kiz oyunlari kiz oyunu oyna porno sex porn sex r57.txt c99 shell hackerbox



Software

October 21, 2010

Train with a Trainee: Week 1 Part C – Introduction to Java

New Java Project

Train with a trainee: Introduction to Java, Week 1 part C

First and foremost, and I can’t stress this enough, I am not a developer. I want to be though and that’s what counts. If any of the information provided in this 12 week series is incorrect or can be made simpler, please let me know.

This is the third installment of the course. This section deals with part (4) Introduction to Java.  To keep up with the posts  follow @AndroidSPIN and @openandroidmove on twitter for when a new series is up for you to view and learn from. You can also find the whole series HERE in our Forums that will be updated with each step written.

Introduction to Android and Java.

(1) Installing Android – Completed HERE
(2) Creating Hello World – Completed HERE
(3) Running on Emulator - Completed HERE
(4) Introduction to Java, Variables, Data types, Loops, Conditionals and Operators

The final section in this week’s lesson deals strictly with Java coding basics. For the unfamiliar individual, Android is based off of Java. A little  background on Java so we get a basic understanding of what it is and what it does:  Java is an object-oriented programming language. According to my research it was developed by a man named James Gosling and his team and Sun Microsystems. Java applications are most often compiled into bytecode or class file that is capable of running on any Java Virtual Machine (JVM). It is designed to be simpler than its counter parts such as C or C++. The basic principle is to “Write Once, Run Anywhere.” Anyone that is familiar with rooting an Android phone will remember seeing ‘wipe Davlik cache’. The Davlik Cache is the cache for your Davlik VM which is responsible for running your applications. So to make it easier to understand from my reading, JVM is DavlikVM on your phone.

With a little background out of the way it’s on to more important things, like how to write code. Since this next session is about the basics we won’t be actually writing anything for your device or need the AVD at this time. This lesson is about data types, creating loops, what conditionals are and what operators are. Since this section is rather large I feel we should break it down into multiple sections so as not to overload us with information. I hate reading a 50 page training session. So let’s start off with starting a NEW JAVA PROJECT then move into basic code to print a text on your console window.

We will still be using Eclipse for this lesson. Let’s get started.

Open up Eclipse and go to File > New > Java Project.

In your project name field you can type “Learning” and hit Finish. We now have a learning Java folder on the left hand side of Eclipse. So far so good, but we still don’t have a working file yet. If you remember from our Hello World application we had a Package and a src file. Right now this folder is empty. So we need to manually add these in.

What we want to do first is RIGHT click on the learning java folder and select NEW > Package. It will give the source folder we just need to name it. In the Name field: learning

Now open up the learning java folder and then open up the src folder. You will now see a package named learning. We are almost there. We need to RIGHT click on the package select NEW > CLASS

We need to name it again, to keep things simple name it ‘learning’ and put a check mark on “public static void main(String[] args)” Then select Finish.

Now we have a Java program ready for tinkering. This is where the fun begins and gets a little crazy. The good news is this is the last session for the week. So you have until next week to tinker and get the basics down. I am going to do my very best to make this as simple as possible.

Our first Java application will be just like the Hello World one we did for Android, very basic. You see this identical code on your screen with the exception of the highlighted section. I would recommend typing in the highlighted code. Repetition is a good thing here. You can just copy and paste it if you wish but I have found that it doesn’t always work.  Let’s give this string a try.

package learning;

public class learning {

/**

* @param args

*/

public static void main(String[] args) {

System.out.println(“Androidspin”);

}

}


Once you have it typed in, if it is correct there should be no RED checks anywhere next to the code. I like that Eclipse lets you know that something in your code is not correct and identifies that line for you. As you are typing in the code there will be a red X at the left of the screen, don’t worry about that unless you have written the code and it is still there. Then compare your code to the example code and see what is missing. You will notice other things that Eclipse does to help you out. It’s pretty nice.


Now if you RUN the project you will see our text that was placed inside the quotations listed in the OUTPUT window below your project window. Feel free to play around with it all you want. Anything you place inside the (“ “) field will be displayed in the window.

Alternatively the more lines you add in the more it will display for you. Such as:

package learning;

public class learning {

/**

* @param args

*/

public static void main(String[] args) {

System.out.println(“Androidspin”);

System.out.println(“Your #1 source for everything Android”);

}

}


Pretty simple and easily duplicated. You can spend some time here if you want getting familiar with this process. We will be using it again in the next section.

In an effort to break these into manageable sections for everyone I’m going end this one here to give you all a chance to soak this information up and practice a little. The next post will be up shortly and we will move into variables and using them to calculate equations.

Don’t forget you can catch up on previous posts in our forums HERE.










About the Author

Stormy Beach
I worked at T-Mobile for 5 years. I was the go to guy for Android phones and training. That passion didn't stop even after my departure from the company. I currently moved up from my MyTouch 3G to a Samsung Vibrant. A lot has changed in a very short time. I look forward to all the latest and greatest every time I wake up.





 
 

 
Screen Shot 2012-05-18 at 6.19.43 PM

The ManDroid Show: Free the HTC EVO 4G and One X! Lock Up the iPhone!

Thank you as always for clicking into another episode of The ManDroid Show. Apple, I swear, why do you got to make our lives miserable? Try concentrating on make your out dated phone batter. Enjoy the show! News Topics HTC EVO ...
by David Pena
1

 
 
OutSPin_Permissions_Final

OutSpin: Why Google will never get it right!

These have been an interesting two weeks (last week writer’s block did win over me) in the Android/Google world: Samsung presented the Galaxy SIII, Google and Oracle were in court waiting for a decision that could change ...
by Fernando Fonseca
6

 
 
Huawei Prism

[Poll] Are entry level Android devices a step backwards in promoting the Brand?

Here I am, sifting through thousands of stories from around the web trying to find the next cool or big thing that you guys might want to know about. That is when I stumble upon a post over at Tmonews about the Huawei Prism 3G ...
by Stormy Beach
5

 

 
Wii-U-Android

[Rumor] Nintendo’s Wii U could be powered by Android

So, last year at E3, Nintendo announced the successor to the Wii, named the Wii U. Its announcement was met with some excitement and some disappointment from Nintendo fans around the globe. Personally I feel Nintendo took a t...
by Stormy Beach
3

 
 
SlideToUnlock

OutSpin: There’s something wrong with this picture (and other considerations)

Writer’s block sucks and I suffer from it. Not for a lack of things to say – I have literally dozens of ideas during the week – but when it gets to the moment that I have to sit down and translate those ideas ...
by Fernando Fonseca
1

 
 
boeing-android

Boeing makes more than jumbo Jets

Looks like they will let anyone make an Android device now a days. Just kidding. That is the point of an open platform after all. Another big name company, know more for jets that get our poor pathetic butts to events, is looki...
by Stormy Beach
1

 




2 Comments


  1. [...] we will create a new Java Project. Same as we did to set up our Learning Project. Go to File > New > Java Project. Project name: Learning2. On the left side of  Eclipse you will [...]


  2. [...] we will create a new Java Project. Same as we did to set up our Learning Project. Go to File > New > Java Project. Project name: Learning2. On the left side of  Eclipse you [...]



Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


 
sexsikislezbiyensex izledeutschsex.netdeutschporno.net sexpornoporn videoshd sexsex free pornfree Porn videos
kiz oyunlari kiz oyunu oyna porno sex porn sex porno