Welcome to Java

12.01.2018 |

Episode #1 of the course An introduction to Java programming by Alex Theedom

 

So, you want to learn Java! You’ve made the right decision. Java is the world’s most widely used programming language and has been at the top of the pile for 20 years. You will be joining nine million other Java developers that create some of the world’s most widely used websites and devices.

• Did you know that every Android device and application is written in Java?

• Did you know that 100% of Blu-ray devices run Java? Not to mention millions of smart devices such as TVs, watches, fridges, and so on.

• Did you know that the chip on your credit card contains a small Java application that activates every time you use your card?

• I haven’t even mentioned the millions of web applications and enterprise systems that are written in Java.

As you can see, Java is everywhere, and developers are in high demand and command an average salary of $80,000.

If you don’t have a computer science degree, that doesn’t matter. Java is a language that can be learned without specialist knowledge. It just requires practice and an inquisitive mind, and you can learn Java at home, on your way to work, in the evenings, and on weekends and become a sufficiently skilled developer to get an entry-level position in a company.

How do I know it’s possible? I know, because that’s how I started. I studied on weekends and evenings. I read books and did online courses and practiced till I got it right, all while I was working my day job. This is how I know you can do it too. Now I am a Java consultant, a LinkedIn instructor, a published author, and a regular conference speaker.

 

What Will You Learn?

By the end of this course, you will have learned how to write code that:

• interacts with the user

• does simple math

• uses loop constructs

• makes decisions

• is a guessing game

• generates a random lotto number

• stores data in an array

• is a lucky dip game

• is a hangman game

 

Are You Ready? Let’s Get Started

To write code, you need an Integrated Development Environment (IDE). This is just a fancy name for a text editor that has features that makes it easier to run the code. Normally, you would download and install it onto your computer, but to make it easier, you’re going to use an online IDE. It is free, and you can access from anywhere you have internet access, even on your mobile device.

Follow these steps:

• Go to codiva.io and create an account. It’s free.

• Click on Create Account and enter your email address and password.

• Enter the project name: Lesson 1, and click create.

• Enter the name of your first program: HelloWorld (no spaces), and click create.

You will now see your first Java program automatically generated.

class HelloWorld {
   public static void main(String[] args) {

    System.out.println(“Hello Codiva”);

  }
}

• The program is very simple and just prints the message, Hello Codiva, to the screen. To make it do this, you need to run the code. Click the run button you see on the screen.

The code will run and the Hello Codiva message will print to the Console at the bottom of the screen.

Congratulations, you have run your first Java program! Now let’s make the program print a hello message to you.

• Go back to the code and change just the word, Codiva, to your name, making sure to not delete the quotes.

• Click the run button and check the message in the console. It will say, Hello YourName.

Congratulations, you are well on your way to being a Java programmer!

In Lesson 2, you will write code that interacts with the user—that’s you—and asks a question.

 

Recommended book

Beginning Programming with Java For Dummies by Barry A. Burd

 

Share with friends