Java is a very popular strongly-typed programming language used by
developers worldwide. To declare a variable's type, you simply
mention it before the variable name as follows:
String myString;
There are also primitive types in Java, making operations
involving them more efficient by optimizing the necessary storage
bits or bytes. These declarations are example of primitive types,
which always start with a lowercase letter:
int myNumber;
double myDecimalNumber;
char myCharacter;
Oracle Corp. (headquartered in Redwood Ciy, CA, United States of
America) is the current owner of Java. Oracle releases new updates
to Java called JDK's on a yearly-or-so basis.
What you should already know
Java has been around since before the turn of the century.
With hundreds of thousands of developers worldwide, Java is one of
the more popular backend development languages today.
JavaScript and Java are similar in some ways but fundamentally
different in some others. The JavaScript language resembles Java
but does not have Java's static typing and strong type checking.
In contrast to Java's compile-time system of classes built by
declarations, JavaScript supports a runtime system based on a
small number of data types representing numeric, Boolean, and
string values.
To get started with writing Java, open your favorite Java IDE (for
example Eclipse, Spring Tool Suite, JDeveloper, etc) and write
your first "Hello world" Java code:
class Main { public static void main(String args[]) {
System.out.println("Hello World!"); } }
Run the class from the IDE tools and watch your first piece of
Java magic unfold!
The latest Java Development Kit has many data types, including the
following:
Although these data types are a relatively small amount, they enable
you to perform useful functions with your applications. Objects and
functions are the other fundamental elements in the language. You
can think of objects as named containers for values, and functions
as procedures that your application can perform.
All the documentation in this page is taken from
https://www.oracle.com/java
More information about this and other Oracle products can be found
at
https://www.oracle.com