It’s Time to Learn Java!

Olesya Miller
2 min readMay 24, 2021

Hi everyone! Today I have decided to write a post about Java programming language. I hear about Java all the time, and when I browse job listings in software development I see tons of jobs for Java developers. That’s why I decided I should also learn it! Let’s go!

Java was developed in early 1990’s by Sun Microsystems. One of the huge benefits of Java is that it allows you to build applications that can run on Windows, Mac and Linux. In other words, Java programs are portable across different platforms. Each program is translated into Java bytecode. Each machine has JVM (Java Virtual Machine) which knows how to execute Java bytecode. Java lets us build applications that could be used by as many people as possible with as little work as possible. Java is a very powerful programming language. Us, developers, write code ( a series of commands to tell the computer what to do ) and Java has made the process of us talking to the computer super easy. The reason is because Java is a higher order language.

Let’s write our first “Hello Word” Java program.

public class MyFirstJavaProgram {
public static void main(String []args) {
System.out.println("Hello World"); // prints Hello World
}
}

Easy! Here are some things to remember when writing Java code:

  1. Java is case-sensitive
  2. The first letter of a Class name should always be capitalized
  3. Java is Object-Oriented
  4. Java data types are: String, int, float, boolean, char (stores single characters)
  5. Integer data type has its own types such as long, short, byte (that depends on how long a number is)
  6. When declaring a variable, you always have to assign it it’s data type —
String name = "Olesya"
int myNumber = 31

7. If you add the keyword ‘final’ to the beginning of a variable declaration it becomes immutable

final int myNumber = 31 
myNumber = 30 (that will generate an error)

I didn’t know Java was so much fun!

That’s it for today, guys! Happy coding!

--

--