Subject Code :BT21ITE33 Module 2 Topics Covered - Data Types
- Operators
- Control Statements
- Variables & Arrays
- String Handling
Data Types - Data types specify the different sizes and values that can be stored in the variable. There are two types of data types in Java
- Primitive data types: The primitive data types include Boolean, char, byte, short, int, long, float and double.
- Non-primitive data types: The non-primitive data types include Classes, Interfaces, and Arrays,Strings.
- In Java language, primitive data types are the building blocks of data manipulation. These are the most basic data types available in Java language.
Operators in Java - Operator in Java is a symbol that is used to perform operations.
- Java divides the operators into the following groups:
- Arithmetic operators
- Assignment operators
- Comparison operators
- Logical operators
- Conditional operators
Arithmetic Operator Arithmetic Operator - Arithmetic operators are used to perform common mathematical operations.
Comparison operators Assignment operators - Assignment operators are used to assign values to variables
- For example, we use the assignment operator (=) to assign the value to variable x:
- in x=10
Logical operators Conditional operators - Consider this example
Int a=30;
Do'stlaringiz bilan baham: |