Despite taking an AP class on Java, I did not do very well, as I didn't like the language very much at the time, and still don't like it too much. Nonetheless, I still did learn some Java. This document will go over my knowledge of the Java programming language.
A standard Hello World program in Java. I memorized the class and System.out.println lines, but I still haven't memorized the public static void portion.
public class java {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Originally, I got stumped in class in the beginning, as I couldn't figure out if the l
in println
was a capital i
, or a 1
.
Section coming soon
I have to give credit to one of my friends for a joke in this example, there was a funny joke he made when we were going over superclasses, and he came up with the term super duper mega class
in his answer. I did not come up with this one.
public class superDuperMegaClass {
public static void main(String[] args) {
System.out.println("Welcome back to Java class");
}
}
public static void aFunctionalFunction() {
System.out.println("This function has functioned its functioning function.");
}
return aFunctionalFunction();
Importing just the Java utilities (scanner) this will also be used in the next example.
import java.util.scanner();
Importing ALL Java libraries (not always recommended)
import *
I never nailed this one down, but it was deemed very important to me.
import java.util.scanner();
// Blank for now
I can't do the rest of this right now.
/!\ This example has not been tested yet, and may not work
Section coming soon
Section coming soon
break;
To this day, I am still not entirely sure what the break
keyword does, but most languages support it.
/!\ This example has not been tested yet, and may not work
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Comments in Java are identical to comments in C, JavaScrift, Google Go, C++, etc..
// This is a single line comment
/* This
is a multiline
comment */
/* Multi-line comments
* can also
* be written
* like this */
-
Java can be used as a gateway language to C#, C, C++, Google Go, and other languages
-
Java is not to be confused with JavaScript, although JavaScript was influenced by Java. The same goes for JScript, JavaScript++, and other JavaScript-like languages
-
Java was originally developed by Sun Microsystems in an attempt to create a better TV remote.
-
Java is now owned by Oracle
-
Java was originally named Oak, after an Oak tree outside the developers office.
-
Eclipse is an IDE I learned Java in.
-
Java programs are very verbose (long) compared to languages like Python
-
Java is a curly bracket and semicolon language
-
Javas syntax is very similar to the syntax of C# and sometimes C# is jokingly called
Microsoft Java
-
Java's main file format is
.java
but it uses many other file formats, such as.gradle
.jar
`. -
Jar files are Java Archive files
-
The popular game
Minecraft
was originally written in Java. The Microsoft version is written in C++ -
Java can be used as an applet for web browsers
-
Javas mascot is named
Duke
-
Java has its own virtual machine, known as the JVM (or Java Virtual Machine) for executing Java source code
-
No other knowledge of the Java programming language at the moment.
This list was abandoned for a few months (not even being looked at from 2022 January 14th to 2022 April 18th) I have come back to it on 2022, April 19th, due to renewed interest in programming language knowledge repositories. I intend to keep as much of the original structure as possible, while also adding new knowledge. This is a legacy document, and was written differently than how I have been writing these types lately. Legacy parts (such as variables in <language>
sections) will remain unchanged, while improvements will take place (notably: Adding new other knowledge of Java
adding the developer notes section, referencing the Java logo, adding sources, adding a file version timestamp, changing all level 4 headers to level 2, and changing the title header from level 3 to level 1)
When this list goes public, it will still be incomplete, and will not be regarded as a complete entry.
File version: 1 (2022, Tuesday, April 19th at 7:40 pm PST)
- Prepared 1 day early