Oop’s Using java


Download 0.74 Mb.
bet1/12
Sana15.11.2023
Hajmi0.74 Mb.
#1775298
  1   2   3   4   5   6   7   8   9   ...   12
Bog'liq
OOP’s Using JAVA Module 2

OOP’s Using JAVA

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

  1   2   3   4   5   6   7   8   9   ...   12




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling