To declare a array in Java, you have following options:
- dataType[] variableName;
- dataType variableName[];
- dataType []variableName;
The 1st is clearly related to how Java actually works, and you can read it as "dataType array variableName".
The conclusion is:
- dataType[] variableName;
- dataType[][]...[] arrayName;
IE8 have 3 kinds of browser mode, but give different user agent string
IE7 mode give you
Mozilla/4.0 (compatible; MSIE 7.0; ...;)
IE8 mode give you
Mozilla/4.0 (compatible; MSIE 8.0; ...; Trident/4.0; ...;)
IE8 compat view mode give you
Mozilla/4.0 (compatible; MSIE 7.0; ...; Trident/4.0; ...;)
Trident/4.0 is the important string to determine the real mode and version of IE8.
. [] ()
++ -- ! ~
* / %
+ -
<< >> >>> <<<
< > <= >=
== !=
& |
^
&&
||
?:
=
Primitive Data Types- boolean (true, false)
- char (8 bits)
- byte (8 bits)
- short (16 bits)
- int (32 bits)
- long (64 bits)
- float (32 bits)
- double (64 bits)
Reference Variables vs. Primitive Variables- Primitive variables are variables with primitive data types. They store data in the actual memory location of the variable is.
- Reference variables are variables that stores the address in the memory location. It points to another memory location of the actual data is.
public class Hello {
/**
* My first Java program
*/
public static void main(String[] args) {
//prints the string "Hello world!" on screen
System.out.println("Hello world!");
}
}
Error Types
- Syntax errors
- Run-time errors
Java Comments
- C++ Style Comments
- C-Style Comments
- Special Javadoc Comments
What is Java Technology?- A programming language
- A development environment
- An application environment
- A deployment environment
Some Features of Java- The Java Virtual Machine (JVM)
- Garbage Collection
- Code Security
Java, JavaScript, HTML, XHTML, AJAX, CSS, etc.