Posts

Showing posts from May, 2024

Java Notes

1) What all datatypes you know in java? ->  Data type specify the size and value that can be store in variable.     DataType are divided into two group :    - Primitive datatypes include byte,short,int,long,float,double and char.    - Non Primitive datatypes include String,Arrays,Classes and Interfaces.ss 2) Can you give size required for each datatype? ->      DataType   Size   Description    -byte     1 byte       Stores whole numbers from -128 to 127    -short     2 bytes       Stores whole numbers from -32,768 to 32,767    -int     4 bytes       Stores whole numbers from -2,147,483,648 to 2,147,483,647    -long     8 bytes       Stores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807    -float     4 bytes  ...