Basics of Java Pt.2
There are
some things you need to remember before coding Java. Before you start
- You need to create a project
- Create your class under the project you want
- Always start with: Public static void main (string [] args)
- remember to use a scope “ { “ at the end of public static void main(string[] args)
- after you’re done with your coding: System.out.println();
- and you need close the scope “}” after typing system.out.println();
- If you open with many scopes; you need close every scope that was used in the beginning
You can’t code the way you want; then how?
Java special words called Primitive Types.
They are given below:
Here are the features:
Category
|
Types
|
Size(bits)
|
Interger
|
byte
|
8
|
char
|
16
|
|
short
|
16
|
|
int
|
32
|
|
long
|
64
|
|
Floating- point
|
float
|
32
|
double
|
64
|
|
Other
|
boolean
|
1
|
- Boolean is true or false.
- Void is also another primitive type tells which the compiler that main () does not return a value.
Comments
Post a Comment