What is the Type casting ?

No comments

We  often  encounter  situation  where  there  is  a  need  to  store  a  value  of  one  type  into  a  variable  of  another  type  in  such  situation  we  must  cast  the  value  to  be  store  by  processing  with  the  type  name  is  parenthesis.

The  syntax  will  be  type  variable 1=(type)variable2.

Int m=50;

Byte n=(byte)m;

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀