JAVA (Newbie to Newbie)

In my current class, we are using Java. Of course, I mean the programming language not the coffee--I want coffee in every class! Since my only other programming experience is with a tad of Python, here is my completely newbie description of what to expect and what to do.

Installing a Java IDE

Before you even start thinking about which IDEs and what you want to build, you need to install the Java Developer Kit. To do this, search for JDK installation. It should take to you the Oracle site--Oracle owns Java--which will have the IDK package. download it and unzip it if needed. and run it. 

Now, you can think about an IDE. First off, you could easily just use notepadd++ or something similar to type what you need. I personally am liking right now an IDE called Eclipse. It seems to be very popular and is really simple to install. Just search for the installation package and run it as you would any program. 

Making a program

Writing my first program was a little complicated. The first step is to create a new java project. After that, you must declare a class for it. For instance with " class HelloWorld. I think this basically defines the program you are writing. From there the experience is similar to Python. you have a print command, which is longer than Python's "print." instead you must type System.out.println. The "l" println is a lower case L by the way. Not an uppcase i or a number 1. That got me the first time. After that, enclose you string of characters of choice with quotes and parenthesis just like Python. So, it would be System.out.println("Hello World"); In java, the semicolon is very important. it must end each line.

Running a Program

Eclipse has its own compiler and run tool. Just right-click on you program name in that left tree and select "run as." Then click "Java application." That should do it. Depending on your OS and subsequent version of terminal or CMD, you could compile it and run it that way. You just have to find the command line for you OS of choice's terminal. 


Comments