Data types in java (1) - PowerPoint PPT Presentation

About This Presentation
Title:

Data types in java (1)

Description:

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. – PowerPoint PPT presentation

Number of Views:42
Slides: 18
Provided by: haseem

less

Transcript and Presenter's Notes

Title: Data types in java (1)


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
  • Byte
  • Short
  • Int
  • Long
  • Float
  • Double
  • Boolean
  • Char

5
Non-Primitive Data Type
  • It can be classified into 2 types,they are
  • String
  • 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
  • Single-Dimension Array
  • Multi-Dimension Array

16
String
  • String is a collection of character
  • It can be initialized into double quotes
  • For example
  • String stMy Name

17
CONTACT US
www.accordittraining.com
Emailenquiry_at_accordittraining.com
Call us 91 9940289059
Write a Comment
User Comments (0)
About PowerShow.com