Tag Archives: java

Fundamental Programming Structure (Java)

Key points of Java

  1. In Java, all methods are declared in a class. You invoke a nonstatic method on an object of the class to which the method belongs.
  2. Static methods are not invoked on objects.
  3. Java has eight primitive types: five integral types, two floating-point types, and boolean.
  4. The Math class provides common mathematical functions.
  5. String objects are sequences of unicode code points in UTF-16 encoding. Or more precisely code units, the 16-bit quantities of  the UTF-16 encoding.
  6. With the System.out object, you can display output in a terminal window. A Scanner tied to System.in lets you read terminal input.
  7. Arrays and collections can be used to collect elements of the same type.

Continue reading

Leave a comment

Filed under Uncategorized

Install java (jdk) on Linux

Introduction

If you have downloaded java development kit (JDK) Linux binary tar.gz file from oracle.com (e.g jdk-7u21-linux-x64.tar.gz), you might probably be thinking how do I install it. On most Linux distributions, you might be able to install java or jdk using official or third party repository, but some people prefer doing it offline. In this tutorial, I will try to explain that.

Continue reading

Leave a comment

Filed under Uncategorized