Skip to content

Just a little course I made for myself and possibly others on how to create code using Java. It isn't complete as I am still teaching myself Java, but I figured I'd share it here in case anybody wanted to learn Java the way I did.

Notifications You must be signed in to change notification settings

PrimisRulz/Java-for-Beginners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Java-for-Beginners

Just a little course I made for myself and possibly others on how to create code using Java. It isn't complete as I am still teaching myself Java, but I figured I'd share it here in case anybody wanted to learn Java the way I did.

(Just a heads up, this guide is for Windows users as thats the OS I am using. I've never used Linux or MacOS before, so if you know how to basically do what I describe for Windows, great! Otherwise, I would reccomend going to https://www.w3schools.com/java as that is the website I used to teach myself Java and they do cover how to start using Java on those OS's. Anyways, happy coding!)

I first started off creating this as a tool for myself. I actually organized all of this early on to help me find files and examples if I needed to find help regarding why certain coding projects in the future weren't working for whatever reason! After some time, I realized how neatly organized I had made this file and how well constructed my notes were. I decided that whilst teaching myself, I was going to create a compiled document containing everything I have constructed thus far! Whether through notes, example files for each subject, or whatever! I Hope that this document helps you as much as it helped me, (and to this day still does!)

There are a couple things you need before you can get started using this document efficiently.

  1. DOWNLOAD JDK

Download the latest JDK build. You can easily find the required file needed to download and install to your pc through an online search. (MAKE SURE YOU DOWNLOAD THE WINDOWS VERSION AS THE FIRST OPTIONS ARE FOR LINUX)

  1. USE NOTEPAD

I would reccomend using notepad when editing the code. It is what I used when I taught myself Java as it works well for this purpose, which is to learn a computer programing language! We aren't trying to make mods or other programs just yet lol.

  1. USING COMMAND PROMPT AND RUNNING YOUR CODE

  2. Command Prompt will be used A LOT if you follow along with my document. Whenever you use cmd prompt, run it as admin everytime just in case!

  3. When you are trying to run your code, make sure that you set the proper file directory in command prompt(If you don't know how to, copy the file directory in File Explorer, and in cmd type "cd [File directory]", and press ENTER. Then you can run your code)

  4. When running your code, make sure your file type is saved as .java, and not .txt

  5. To run your code, go to your file directory where your .java file you want to run is located. Then, type "javac [File Name].java" (keep in mind, caps do matter) and hit ENTER. If there are no issues in your code, it will just go to the next line in cmd. If not, then it should tell you were in your code the issue has arisen. (Once your file has no issues,) run a new command "java [File Name]" and hit ENTER. Congrats! You have now officially ran your first Java file! Now, if you were to check in file explorer, you should see that above your original .java file, you now have a .class file. That is what the command "javac" did to your file! DO NOT DELETE THIS FILE (unless you are going to recompile the file, but even then changing the code and then running the command will overwrite that file as long as the name stays the same.) as that is a compiled version of your original Java file.

About

Just a little course I made for myself and possibly others on how to create code using Java. It isn't complete as I am still teaching myself Java, but I figured I'd share it here in case anybody wanted to learn Java the way I did.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages