Language Basics
Contents
Language Basics
Control Structures
- Loops
- If-else
- Switch
Same as C!
|
|
Object iteration
|
|
Concatenation
We can concatenate a Number and a String through the magic of polymorphism!
|
|
Data Types
String
Boolean
Arrays
have a length, with<Array>.length
Packages
package
to declare a namespaceimport
to import
Niches
Every file is a class
Every file is stored in a class file, even if that file is not related to an object
The class name must be the same as the file name
If your code has
|
|
You must name that file Foo.java
Program entry point
All entry points (places where the program can start) follow the syntax of the
|
|