Chapter 4
1. abstract
2. assert
3. boolean
4. break
5. byte
6. case
7. catch
8. char
9. class
10. const
11. continue
12. default
13. do
14. double
15. enum
16. else
17. extends
18. false
19. final
20. finally
21. float
22. for
23. goto
24. if
25. implements
26. import
27. instanceof
28. int
29. interface
30. long
31. native
32. new
33. null
34. package
35. private
36. protected
37. public
38. return
39. short
40. static
41. strictfp
42. super
43. switch
44. synchronized
45. this
46. throw
47. throws
48. transient
49. true
50. try
51. void
52. volatile
53. while
⦁ False, null and true will be treat as a value.
⦁ Java language supports Unicode.
⦁ syntax for deceleration of a variable.
DataTypeName VariableName;
e.g. : int var;
⦁ If the constant is to represent a long integer value, it must be suffixed with L or l and float value must be suffixed with f. Because default integer data type is int and default real data type is double.
⦁ In java language integer constant can be specified into following formats.
a. For Decimal format simply write that number like 172.
b. For Binary format use 0b as post fix like 0b110010.
c. For Octal format use 0 as post fix like 0372.
d. For Hexadecimal format use 0x as post fix 0x18A.
Keywords and Data type in Java
There are 32 keywords in Java language1. abstract
2. assert
3. boolean
4. break
5. byte
6. case
7. catch
8. char
9. class
10. const
11. continue
12. default
13. do
14. double
15. enum
16. else
17. extends
18. false
19. final
20. finally
21. float
22. for
23. goto
24. if
25. implements
26. import
27. instanceof
28. int
29. interface
30. long
31. native
32. new
33. null
34. package
35. private
36. protected
37. public
38. return
39. short
40. static
41. strictfp
42. super
43. switch
44. synchronized
45. this
46. throw
47. throws
48. transient
49. true
50. try
51. void
52. volatile
53. while
⦁ False, null and true will be treat as a value.
⦁ Java language supports Unicode.
⦁ syntax for deceleration of a variable.
DataTypeName VariableName;
e.g. : int var;
⦁ If the constant is to represent a long integer value, it must be suffixed with L or l and float value must be suffixed with f. Because default integer data type is int and default real data type is double.
⦁ In java language integer constant can be specified into following formats.
a. For Decimal format simply write that number like 172.
b. For Binary format use 0b as post fix like 0b110010.
c. For Octal format use 0 as post fix like 0372.
d. For Hexadecimal format use 0x as post fix 0x18A.
Comments
Post a Comment