00:01
In this example, i'm just going to be showing you how to write a very basic program.
00:05
All this program is going to do is once we run it, it's going to print out hello world, or it'll print out whatever you tell it to you.
00:12
We'll just start with hello world.
00:14
Right, i'm using java.
00:18
There was no language specified in the problem, so that's what i'm familiar with, but you can use whatever language you work with in your own lab.
00:25
Right, but for java, first we need to define a class.
00:31
And this class is going to be public, which means anyone can access it.
00:35
You do that by saying public class.
00:40
Then we need to name our class.
00:42
I'm going to name my main.
00:46
All right.
00:47
And everything will be defined within this class.
00:50
Right.
00:50
And we open that with a bracket and open bracket.
00:55
I'm going to write my method.
00:56
This is where we put what we want our program to do.
00:59
I will name that main as well.
01:00
All right.
01:01
And we're going to call that.
01:06
Public static void main string and these two closed bracket open and closed bracket that means array so we're going to be taking in an argument of an array of strings args we'll name that args so my method is public anyone can access it static means it's static for it means it does not return anything so you can write methods that will output a value rather than outputting a process.
01:56
This one is just going to print out hello world, but it could also have a variable associated with it.
02:02
But we don't have that.
02:03
We have a void.
02:05
All right.
02:06
And then we'll have another bracket.
02:08
And this is where we tell this method what to do.
02:12
And i want to print out hello world...