basicsjava

Introduction about java:

java is a staticaly type programming language. java is a high-level,class- based,object oriented programming language that is designed to have as few implementation dependences as possible.

Designed by: james goasling.

First appeared:may 23,1995;26 years ago.

Latest release: java se 16(16 march 2021).

Why java:

Java was designed by easy to use and is therefore easy to write,compile,debug,and learn than other programming languages.

What is JDK,JVM,JRE in java:

JDK: java developmentkit.it is used to convert the .Java programming to .class file.

JVM: java virtual mechine its used to convert the .class file to Binary file(0,1s).

JRE: java runtime environment runs on top of the OS and provides additional java-specific resources.

Datatype in java:

Data type specify the different sizes and values that can be stord the variables.there are two types

Primitive data type: the primitive data type include boolean,char,byte,short,int,long,float and double.

Non-primitive data types: the non-primitive data types include Classes,Interfaces, and Arrays.

Data TypeSizeDescription
byte1 byteStores whole numbers from -128 to 127
short2 bytesStores whole numbers from -32,768 to 32,767
int4 bytesStores whole numbers from -2,147,483,648 to 2,147,483,647
long8 bytesStores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
float4 bytesStores fractional numbers. Sufficient for storing 6 to 7 decimal digits
double8 bytesStores fractional numbers. Sufficient for storing 15 decimal digits
boolean1 bitStores true or false values
char2 bytesStores a single character/letter or ASCII values

Leave a Comment