This week we’re allowed to talk about essentially anything we want in regards to digital media.
Now, I thought I would do something that was more blog-y and teach you guys something interesting.
Well, as you know, one of my very first pages is a shoutout to programming. The whole Hello World thing is pretty popular to programmers, and while I’m not so experienced that I can call my self that, I thought I might teach you guys how to write a really basic and simple program…HELLO WORLD!
Now, you will need a few things for this and one of them is a compiler, I would personally choose the one that I was “raised” on, since if I understood it, then you should have absolutely no problem.
Here’s a basic list.
- Need to install JAVA JDK (in order to run the compiler)
- DR JAVA
- Editpad Lite (completely optional)
All the programs above are free and don’t cost anything, they also take little to no room on your computer and hardly use up your RAM.
Now, a few things. We will programming in the Java language. There are lots of different languages out there, the internet for example is written in HTML, and essentially every single computer in the world runs programs written on C++ but we won’t get into those. If you’re really interested, I would recommend playing around with python, and learning C++ and if you like animation go into flash and try out their own language.
Anyways, here we go.
Now, that you’ve downloaded the necessary programs, open up Dr Java, and it should look something like this.
Now, there’s a bunch of buttons everywhere but you don’t need to worry about those for now.
First, you should know that dr Java is a very simple application software so right now, what you’re building isn’t a complete application but a class that runs as an application.
On the first line, write out
public class WhatEverYourTitleIs (note you cannot put spaces in between the title)
Now, what did we do here? The first two lines indicate what you’re building, public shows that it is visible for everything in the program to see and the class shows what type you’re building.
Go on the next line and enter an OPEN FRENCH BRACKET!
Be very very careful, this won’t work if you use any other type of bracket other than an OPEN french bracket.
What this does is show where your Class that you wrote in step two starts. Technically, you could write that bracket just next to your title name, but it doesn’t look very pretty.
This is where it gets a bit confusing…
Type out the following series of words exactly as they’re written,
public static void main (String  args)
Now, long story short, what you just wrote opens up a series of key words that are integrated into dr java and that it recognizes as part of the java language.
Write another OPEN FRENCH BRACKET on line 5
Now, the program we’re writing is a simple that essentially tells the computer to tell us HELLO World. To do that, we need to reference the system.
First type out
Make sure the capitals are in order and that the periods are there with no spaces, and it’s ln not line.
Directly next to that type out
Note the type of bracket, the quotation marks and the semicolon, which serves to indicate the end.
You should have this
On the next line, type a CLOSED FRENCH BRACKET
this will indicate the end of main.
Type another CLOSED FRENCH BRACKET ON THE NEXT LINE,
this will indiCATE the end of the class
Look over your code, it should have the following
public class WhatEverTheTitleIs
puclic static void main (String  args)
Press compile at the top, which will prompt you to save. Make sure the the saved file is the same name as your class or it won’t work.
and watch at the program as it writes out