Monday, 9 April 2018

Variable Declare in Java


  • Declare datatype.
  1. byte (number,1 bytes)
  2. short (number,2 bytes)
  3. int (number,4 bytes)
  4. long (number,8 bytes)
  5. float(float number,4 bytes)
  6. double (float number,8 bytes)
  7. char (a character , 2 bytes)
  8. Boolean (true or false , 1 bytes)
  9. Declare (Example)
  10. short my-variable=10;
  11. float my-decimal=(float) 4.5;
  12. double my-double=11.56;
  13. char my-char=’A’;

0 Comments:

Post a Comment

Popular Posts

Categories

Android (21) AngularJS (1) Books (3) C (75) C++ (81) Engineering (13) FPL (17) HTML&CSS (38) IS (25) Java (85) PHP (20) Python (83) R (68) Selenium Webdriver (2) Software (13) SQL (27)