3

How to code in Java: Part 1

IJustErik's Avatar IJustErik8/3/18 11:49 pm
3 emeralds 281 3
8/4/2018 4:33 pm
Selvestesjefen's Avatar Selvestesjefen
Java Logo
INTRODUCTION

Hey, I know, you want to learn Java. Its simple. Java is a programming language. Its written in mainly English(you can find support for other languages here). Machines cannot easily understand our language, as they speak in 0s and 1s. We need a translator to say, a compiler, from our language to theirs. We will also need an ide(a tool to help us use java). Continue to installing.
INSTALLING
To turn our code(human readable) to machine code(machine readable), we need a compiler for Java. This can be found in the Java Development kit provided by Oracle, or here. Select your OS and download. Once downloaded, run and click through(the defaults will do).
To get an IDE(integrated development environment) to aid our progress go here. Select your OS and install. Make sure to select "Eclipse IDE for Java Developers" and use the defaults. Once all of that is completed, we have a compiler and an ide. Proceed to open the shortcut and open Eclipse. Continue to coding.

        CODING
Once that is done we can get to coding. You will be greeted by a welcome screen, click the x since your following my guidance. Make a new Java Project by going File > New > Java Project. Name it "Learning Java" and click ok. Now we have to create a new class, as everything in java is in classes. Name it "HelloJava" and use the default package. Clear the contents and paste this in: "

public class HelloJava {
public static void main(String[] args) {
System.out.println("Hello Java!");
}
}
".
Now save it by File > Save or control + s. Finally, we can run it and look at the output: Hello Java! Yay, out first program in Java! I will make more tutorials to help you guys do various things such as the object oriented parts and reflection. OMG I HAD TO REWRITE ALL OF THIS CUS MY INTERNET IS SO SLOW!

Posted by IJustErik's Avatar
IJustErik
Level 4 : Apprentice Modder
5

Create an account or sign in to comment.

3

2
08/04/2018 4:33 pm
Level 2 : Apprentice Miner
Selvestesjefen
Selvestesjefen's Avatar
IjustErik, I am impressed of your java skills.If you are intrested in minecraft and java. Why not make bukkit pluigins.We are looking for a person that can do it for our minecraft server. Do you take the challange? Add my discord Agemo#1352
2
08/04/2018 12:09 am
Level 6 : Apprentice Engineer
TobyTapper
TobyTapper's Avatar
I'm impressed! A java nut like me on pmc. May I ask your skill level?
1
08/03/2018 11:51 pm
Level 4 : Apprentice Modder
IJustErik
IJustErik's Avatar
if u need help, feel free to comment
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome