• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Data types in java
 

Data types in java

on

  • 14,181 views

Java data types

Java data types

Statistics

Views

Total Views
14,181
Views on SlideShare
13,909
Embed Views
272

Actions

Likes
6
Downloads
0
Comments
5

7 Embeds 272

http://www.ustudy.in 211
http://javappt.blogspot.in 42
http://ustudy.in 9
http://javarevisions.blogspot.in 7
http://www.javappt.blogspot.in 1
http://webcache.googleusercontent.com 1
http://javarevisions.blogspot.com 1
More...

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

15 of 5 previous next Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • set of data with means
    Are you sure you want to
    Your message goes here
    Processing…
  • Good:)
    Are you sure you want to
    Your message goes here
    Processing…
  • nice
    Are you sure you want to
    Your message goes here
    Processing…
  • good work
    Are you sure you want to
    Your message goes here
    Processing…
  • nice
    \
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Data types in java Data types in java Presentation Transcript

    •  A data type in a programming language is a set of data with values having predefined characteristics
    •  Each individual character in java program Tokens Java
    •  Literals •Punctuators Identifiers •Separators Assignments •Operators
    • TOKENSA = B + 10 ;I P A ID O U S D LE S E P N IN I N E C TT G T R T EI N I A U M F RF T A E I AI O T N E LE R O T RR R
    •  These are constants in java program The values are fixed
    • STRING LITERALS REAL LITERALS CHARACTERINTEGER LITERALS Literals LITERALS BOOLEAN NULL LITERALS LITERALS
    •  The number that are represented without decimal point Whole numbers having positive or negative values Ex: 16,986,-99,-765
    •  Floating point constants Numbers with decimal points Ex: 89.7, 0.0098, -3.2267,1.0E-03
    •  Constants which are alphanumeric in character Alphabets (upper and lower) Digits Special characters Eg: „B‟, ‟f‟ , ‟4‟ , ‟*‟ Character represents a single digit enclosed within single quotes
    •  Set of alphanumeric characters Group of characters enclosed within double quotes Eg: “Computer” „ “year 2012”
    •  They are special literals They represent true or false and is applied in logical situation There will be no quotes
    •  It is represented as „/0‟ String terminator Marks the end of the string
    •  Punctuation signs used as special characters Ex: ? ; . ; - Statement terminator . - scope of a function Any line continued after semicolon is treated as next line
    •  Special characters in java which are used to separate the variables or the characters () [] {} () – to enclose arithmetic or relational expression [] – to enclose subscript or cell number of a dimensional array {} – to enclose a group of statements
    •  Non-graphic characters They cannot be typed directly from the keyboard Begins with a followed by one of two characters r - horizontal tab v- vertical tab b - backspace
    •  Symbols or tokens Performs arithmetic or logical operations Three types Arithmetic Operator( +, - , *, /) Relational Operator(< ,> , <=, >=, ==, <>) Logical operator ( &&, ||,!)
    • INTEGERS NUMERIC FLOATING PRIMITIVE NUMBERS NON NUMERIC CHARACTE RSDATA TYPE CLASSES BOOLEA N NON- ARRAYS PRIMITIVE STRING INTERFACE
    •  Independent on any other type They are Basic data types EG: byte,int,long,float, double
    •  Derived data types Directly or indirectly dependent on primitive data type They store data data with reference to the address of locations They are also called REFERENCE DATA EG: arrays,classes,interface etc
    • •Direct assignment static of a variable with defined constant •Variables getdynamic initialized during run time
    •  May have any number of characters Contain alphabets, digits and underscore Underscore applied between the characters to increase the length of variable name Name should be meaningful
    • Pure Mixed int a,b,c; X=a+c*12; Expression which Expression includes containing different type of variablessame type of or values to data items yield a result
    • ImplicitExplicit
    •  Data tye gets converted automatically into its higher type without intervention of the user
    •  When data type gets converted to another type after user intervention int a,b; float x=(float) a+b;