1 / 17

Data Types in Java

Accord IT Training one of the best Java Training Institute In Chennai, as we are pioneers in the field for over 13 years and provide the best kind of training experience for our students. We are very confident of this as they are equipped with the best Core Java Training In Chennai.

haseem
Download Presentation

Data Types in Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Best Java Training chennai By accordittraining.com

  2. DATA TYPES IN JAVA

  3. Types They are classified into two types: • Primitive Data Type • Non-Primitive Data Type

  4. Primitive Data Type They are classified into 8 types,they are: 1. Byte 2. Short 3. Int 4. Long 5. Float 6. Double 7. Boolean 8. Char

  5. Non-Primitive Data Type It can be classified into 2 types,they are: 1. String 2. Array

  6. Byte • • • • For Storing whole Numbers It stores a value between -128 to 127 Size = 1 byte Value = 0

  7. Short • • • • For Storing Whole Numbers It stores value between -32,768 to 32767 Size = 2 byte Value = 0

  8. Int • • • • For Storing Whole Numbers It stores value between -2,147,483,648 to 2,147,483,647 Size = 4 byte Value = 0

  9. Long • • For Storing Whole Numbers It stores value between 9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Size = 8 byte Value = 0 • •

  10. Double • • • • It is used for Fractional Numbers It stores upto 15 decimal digits Size = 8 byte Value = 0

  11. Float • • • • It is used for Fractional Numbers It stores upto 7 decimal digits Size = 4 byte Value = 0

  12. Boolean • It is used to tell either true or false

  13. Char • • It is used in character Size = 2 bytes

  14. For Example: • int i = 10; • byte b = 5; • short s = 10; • long = 123l; • float = 23.9f; • double = 34.98d; or 34.98 • boolean = true; or false; • char = ‘A’;

  15. Array Array is classified into two types: 1. Single-Dimension Array 2. Multi-Dimension Array

  16. String • • • • String is a collection of character It can be initialized into double quotes For example: String st=”My Name”;

  17. CONTACT US www.accordittraining.com Email:enquiry@accordittraining.com Call us +91 9940289059

More Related