Monday, April 1, 2019

Java (1)---INTRODUCTION TO JAVA

Introduction to Java

Java programming language



  • release in 1995
  • simple, portable, secure, and robust
  • Java Virtual Machine---ensures the same Java code can be run on different operating systems and platforms
  • Sun Microsystems’ slogan for Java was “write once, run everywhere”.


publicstatic, and void are syntax we’ll learn about in future lessons. 
String[] args is a placeholder for information we want to pass into our program. 
main() method which lists our program tasks
println is short for “print line”. 
We’ll use System.out.println()whenever we want a program to write a message to the screen.
Must use double quotes!

Using the comment lines:
  • When comments are short we use the single-line syntax: //
  • When comments are long we use the multi-line syntax: /* and */.
Java does not interpret whitespace, the areas of the code without syntax, but humans use whitespace to read code without difficulty.

Java does interpret semicolons--- used to mark the end of a statement, one line of code that performs a single task.

Java is a compiled programming language, meaning the code we write in a .java file is transformed into byte code by a compiler before it is executed by the Java Virtual Machine on your computer.

The compiling process catches mistakes before the computer runs our code.
ls is short for "list" and this command lists all the available files.

What I learned in this lesson: 
  I had a basic understanding of how Java programming language works, and I noticed that lots of languages in other language that I've learned is also useful in Java such as the Comment line, Compiling, Executable and Defining.
What I'm doing tomorrow...
  I will be moving onto the next lesson in this unit, which is LEARN JAVA: VARIABLES.

No comments:

Post a Comment