Search This Blog

Sunday, December 16, 2018


Datatype -  Strongly datatype

Basis of memory allocation, data types are classified in two types

1. Value Types - which will allocated the value in stack. = >  int a =10;
2. Reference Types  - which will store the value in the Heap but store the reference in Stack  = String = "Tp";

Stack -  all the memory location of program like method, variable all will store in stack.

Stack  - int a =10  (value types)  S (Reference type)
Heap -                 Tp




Bulk value will be taken care by heap.
Stack stores the fixed values if u store all the values in
stack it will get overloaded and proogram will get terminate so that we are using Heap

 string f = c ?? "Faizal"; // coalescing operator ??

1. Arithmetic Operators =>  + , - , *, /,  % (modulus) , ++, -- increase and decrease by1

Used for mathematical Calculation

2. Relational / Comparison operators =>  ==, !=, >, <, >=, <=

Returns the Boolean value after comparing

3. Logical Operation=> delays with boolean and return boolean too
 &&  - True or false
 ||  - True or false

 ! - if its true will return false
      if its flas ewill return true

Ternary operators  three operands

string s = num% 2 ==0 ? " even"  : "odd";

No comments:

Post a Comment

Validating to select in sequencial order using angular

    < input type = "checkbox" (change) = "handleSelectTaskItem($event, taskItem)" [checked] = " taskItem . i...