Java supports a rich set of operators that can be classified as below : Operator Category Operators Arithmetic operators +,-,/,*,% Relational operators, =,=, != Logical operators &, || Assignment operator =, +=, −=, ×=, ÷=, %=, &=, ^=, |=, >=, >= Increment and Decrement operator ++, - Conditional operators ?: Bitwise operators ^, &, | Special operators. Explicit Typecasting (Narrowing): Storing variable of a larger data type to a smaller data type.Implicit Type Casting (Widening): Storing a smaller data type to a larger data type.It is a method of converting a variable of one data type to another data type to process these variables correctly. Read here: Major features of Java programming Primitive Data Types in Java Data Type Default Value Size (in bytes)ġ byte = 8 bits boolean FALSE 1 bit char “ “ (space) 2 byte byte 0 1 byte short 0 2 byte int 0 4 byte long 0 8 byte float 0.0f 4 byte double 0.0d 8 byte Non-Primitive Data Types Java was modeled in its final form, keeping into consideration the primary objective of having the following features Memory Management: Garbage collected language, i.e., deallocation of memory.Įxception Handling: Catches a series of errors or abnormality, thus eliminating any risk of crashing the system. The only requirement is Java needs a runtime environment, i.e., JRE, which is a set of tools used for developing Java applications.
#Pdf basics in java programing full book code
Thus, byte code is platform-independent and can run on multiple systems. This is because Java code is compiled by the compiler and converted into byte code. Platform-neutral: Java code is independent of any particular hardware or software. Open Source: Readily available for development.
![pdf basics in java programing full book pdf basics in java programing full book](https://content.kopykitab.com/ebooks/2013/07/1457/content/medium/page2.png)
Object-Oriented Programming Language: based on the concepts of “objects”. To check if the entered number is Palindrome.Print all the even numbers between x and y.Enter radius and print diameter, perimeter, and area.