Data types and conversions

Today we learnt about various datatypes- Integer , floating points, Characters and boolean

Integer further has subtypes

  • Byte-1 Byte
  • Short-2 Bytes
  • Int-4 Bytes
  • Long-8 Bytes

Floating Points

  • Float- 4 Bytes
  • Double- 8 Bytes

Characters

  • Char
  • String

 

I also learnt about promotion of expressions. Automatic promotion of expressions is done by the compiler.

 

Small Datatype————–> Bigger Datatype

done by the compiler.

Types of conversions

  • Implicit-automatic
  • Explicit-manual

 

Advertisements

Constructive and genuine appreciation and/or criticism most welcome

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s