Java Techies - Solution for All
Java Techies - Solution for All
Setting up Java envrionment will help in smooth functioning and save valuable time. Set the PATH environment variable if you want to be able to conveniently run the executables (javac.exe, java.exe, javadoc.exe, and so on) from any directory without having to type the full path of the command.
Identifiers, Variable and Constant reference program locations in computer memory that store values that are related to those identifiers.
A Keyword is a word or identifier that has a particular meaning to the programming language. Keywords are pre-defined in the programming languages.
Data type or simply type is a classification identifying one of various types of data, such as real-valued, integer or Boolean.
class, variable, constant or method.
cup or container. It
can hold something. It has a size and a type.
final keyword is used to declare a constant in
java.| abstract | double | int | strictfp |
| boolean | else | interface | super |
| break | extends | long | switch |
| byte | final | native | this |
| case | finally | new | throw |
| catch | float | package | throws |
| char | for | primitive | transient |
| class | goto | protected | try |
| const | if | public | void |
| continue | implements | return | volatile |
| default | import | short | while |
| do | instanceof | static | synchronized |
byte x=10; /* Take 1 byte in memory */ short y=500; /* Take 2 bytes in memory */ int a=40000; /* Take 4 bytes in memory */
| Type | Bit/Bytes | Range |
|---|---|---|
| boolean | 1 bit | True or False |
| char | 16 bit/ 2 bytes | 0 to 65535 |
| byte | 8 bit/ 1 byte | -128 to 127 |
| short | 16 bit/ 2 bytes | -32768 to 32767 |
| int | 32 bits/ 4 bytes | -2147483648 to 2147483647 |
| long | 64 bits/ 8 bytes | Huge To huge |
| float | 32 bits/ 4 bytes | varies |
| double | 64 bits/ 8 bytes | varies |
doesn't hold the object itself, but it
holds something like a pointer, or an address.