Introduction to Java

Hello everyone, welcome to Bndsbon’s blog! Today I will be talking about something every beginnner in Computer Science think they should study—Java.

First, let’s start by looking at the definition of Java, it is a cross-platform, high level language. The very first computer programmers choose Java as it’s name because there is a island called Java that make’s coffee beans, and computer programmers all love to drink coffee…(This might sound a bit farfetched, but it is true.)

24823_963e_12.jpg

picture from udemy

As we know there are hundreds of computer languages, every computer language have their own rules to work, same to Java. All of the source code in Java have to be in plain text files and their ending must be .java (noted that different computer language might have different endings).

Many know Java is a computer programming language, but few knows how Java works. It runs on a softwar-only platform, which is on top of the hardware-based platform. It is also run on Java Virtual Machine and Java Application Programming Interface (API).

50 key words are currently being used and defined in Java, they cannot be used a name for a new class or variable.

There are alot of text writers that is compatible with Java. However, in this computer science class, and the class after we will be using BlueJ.

Three printing method are being used most commonly in Java, they are: print, println, and printf.

Print leaves the cursor on the same line

Println put the cursor on the next line where it is after the text.

Printf is used more frequently in displaying text that needs to be proper formatted and labeled.

Java’s Control flow statements:

IF-THEN or IF Statement
IF-THEN-ELSE or IF-ELSE Statement
IF-ELSE-IF Statement
SWITCH Statement
WHILE Loop Statement
DO-WHILE Loop Statement
FOR Loop Statement
Enhanced FOR Loop Statement

Besides the control flow statements in Java, there are also the swith selection statements, which are frequent used in mutipule choices and selections.

Last but not least, we are also introduced to Scanner, which is a Java Untility, it allows the user of the Java program to substitute a number or work into the program in the platform, in other words, Scanner helped the Java program to be more user friendly. Examples will be listed in the following blog post.

All in all, this computer science class really helped me to hava a foundation on what Java is about and it have reshaped my understanding on Java, I used to see Java as a programming language that is boring and tedius, but it is actully not the case. Neverthelss, I really like to learn more about Java.

Looking forward to our next class!

References:

“Java Tutorial for Complete Beginners.” udemy. n.d. Web. 22 Nov. 2016.

One thought on “Introduction to Java

Add yours

Leave a comment

Create a free website or blog at WordPress.com.

Up ↑