Java Tutorial for Beginners – 1 – Your first Java Program

I will say that whether you are using JDK 6, 7, or 8 does not matter since these are beginning tutorials. The concepts covered will be applicable to all.

If you want to follow the videos you can download Netbeans (any version is fine) here:

You can download the JDK (pick your OS) here:

NOTE: The audio quality improves with Lecture 15. I started using a new microphone.


luka Dz says:

My run program option is disabled i cant click on it please help !?

Sivlejs says:

This guy is a great instructor, I have learn to write Java code from these videos. Thank you very much!!!

Josh Walker says:

This guy clearly knows what he is doing, I searched through Youtube to find a good tutorial and this chap hit the nail on the head; very clear, at a good pace so you can understand as well as make progress, very well laid out and with good explanation of each part of the software as well as the jargon involved. 10/10 Thanks!

Just Me says:

can you skip ‘compile’ and just click run?

bpccDCin2020 says:

THANK YOU for not starting every single statement with either “so” or (worse!) “so you’re gonna want to…” Your “do this, then do this…” tutorial style is much easier to follow and listen to.  Also, GREAT tutorial; I appreciate your sharing this info.

Sea of Thieves - Funny Moments says:

So, if you have hundreds of programs like you said, can different classes interact with each other?

Tal ion says:

Can someone help. When i try to run it it says:
cannot execute java executable not found

Wanna Bee says:

I have been learning from your tutorials. Please understand that your communicative skills are excellent. I don’t know if it is because you are keeping it straight and simple and logical or because of your clear voice that is making learning from your videos an enjoyment. PLEASE do not delete these videos. I have referred many of my work colleagues to your videos for learning code… JAVA. Thank you for your hard work, thank you for people like you sharing info like this.

Doug Hecht says:

Here is the code:
class MyFirstProgram {
        public static void main (String)[] args) {
        System.out.print (*This is my first program*);

and a snippet:

Thank you..

Aswath Gi says:

sir i don’t know which file to download from netbeans ide for my mac
please guide me 🙂

Samuel Barrett says:

A note for Everyone, if you install Netbeans 8.2 install with JDK 8 or lower Not JDK 9. With version 9 it will run, but not allow you to make a new file or project. After you unistall 9 and install 8, when you open NetBeans again, it will ask to use default version and click yes

E R says:

I thought it had to be written as System.out.println(“text here”) to print text. Is System.out.print(“text here”) just a shorter version exclusive to netbeans or something? (I’m new to programming and java but I’v done a bit on code academy) just wondering. thanks

RarneElf says:

Personal note – 2:20 java file.

Jamie Robinson says:

Your videos are SO helpful in my foundations of programming class. It’s an online class with basically just a textbook to go off of, and the text reads like Latin to me. It’s much easier for me to learn when I can actually see what’s supposed to be happening and can listen to someone explain it. THANK YOU!!!

Tux Tek says:

Can I use IntelliJ IDEA instead of NetBeans? It is what we are required to use in class.

tran tam says:

class myfirstprogram {
public static void main (string[] args) {
system.out.print (“this is my first program”);
} my code i can’t run can you help me please !

tran tam says:

can you help me? error cannot find symbol create class string in package …

Obada ashhab says:

love u

Arkham Eisenheim says:

thank you sir! u are very helpful!

Alacritous Alexander says:

thank you 🙂

Levi Price says:

Thank you so much for these videos you earned yourself a like and Im subscribing, these videos are so useful!

Doug Hecht says:

Is there an issue using Netbeans 8.0.2? I have been following your video line by line and it doesn’t seem to be working.. Thank you..

Lwazi Leroy Sibisi says:

Quick question… Can I follow with these tutorials using Adobe Brackets? If so how do I “hook up” the coding with the plugins?

Appficial says:


Antonia Corvasce says:

Hi, thanks for sharing this amazing videos. I am learning so much from them. But I was wondering if Edit Plus is also applicable for those videos ?

Nicholas Coelho says:

Question – when installing Netbeans IDE, it asks about JUnit and GlassFish. are those both necessary while installing netbeans?

TraceyMak1 says:

Better explanation than my teacher.

Colekv says:

I have an issue with NetBeans. Whenever I click new project, nothing happens.

Reimarx says:

Hi I’m an ASCT Student from the Philippines I’m really amazed by your videos, your Videos are better than my teacher, Thank you very much!

Chris D says:

Is the line main kind of like naming a file index.html or main.lua (Löve2D)? Does It declars the start of a program? Is a class similar to a function in javascipt or lua or def in ruby?

AYBIN. V. K says:



Do you have a vid on how to run your program once your done?

Jamesplusgames says:

Is it ok to use Eclipse instead of netbeans? Its just a personal preference. Fantastic tutorials. Keep it up please 😀

Aldo Lopez says:

do i have to do a new proyect every time i do a new program?

Daniel Fernandes says:

Hi, . Thank you very much for your videos! They are gold! Now, straight to the point, my question is: I use Windows x64, is there any problem if I download the Windows x86 version. (I’m asking this because, for example, my old MS Office x64 didn’t work with Systran, and on Systran webpage we can read that it supports only MS Office x86….). 

Joshua Schultz says:

+EJ Media you should do a minecart modding sires of videos sins MC modding involves java. That would be great! only if your up to it…

GoGirlsYeah says:

I like your style a great deal.  Thank you for making your videos.  I wanted to let you know that In the new NetBeans IDE 8.0.2 one can not create a new file called MainJavaProject or even JavaProject.  Just FYI.  Also, I’ve followed along with the code in some of the other tutorials and, although they compile in 8.0.2 they do not produce the same resulting output.  (nothing shows in the output window).  Example is Video 9 with the forloop.

Mohammad Hussein says:


reima jake says:

Hi can you make a tutorial using j creator 🙂

Jacob Barnes says:

your video was informative however i noticed a weird noise in the background that was extremely disconcerting.

Jorge Ramos says:

thank you for this. just started your classes tonight. I will be going trough your java videos completely!

Md Abu Sharif says:

Thanks for the videos!!!!!!


OMG this is so useful! thanks! 😀
I actually learn more here than in class

Yaa B. says:

I did everything but when I hit the run button it says no main class found . What did I do wrong?

Wisper Me says:

Thanks alot! I tried to get eclipse up and running but kept running into snags before I could get it to run this first program. I kept having problems with connecting my java to eclipse and then like I said, I couldn’t even get the first program to run. It wouldn’t connect to my console in eclipse. I downloaded netbeans bundle and bam! I got my first program. I would agree its important to learn to trouble shoot on a computer especially going into programming. I felt like I was trying to beat down a wall with tools I couldn’t understand though. I like Derek Banas on Java. But listening to you, I felt like your style is more in tune with my learning. The way you said 1 class 1 main, its like, I got it! It clicked. So anyways, long story short, I appreciate this video and what your doing. I am happy to finally have taken this first step! I can feel the hammer in my hands now…see its hard dwarven metal head, I might be able to break this wall down after all! 

Nizam Verma says:

I have blue j is it ok

Fahim Ahmed says:

will it be the same if i do it in micromedia dreamweaver 8?

random name says:

plss can u remove the noise in the audio

zecxixo says:

Awesome! Awesome! Awesome!

Walking Taco15 says:

Not working for me, the netbeans thingy doesn’t show java as an option.

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!