java variables | variables in java | what is java | how to use variable in java |

 

         

                      

                        Variables in java


variables type in java :


  • Integer -  Integer it is a only to access a as numbers only absolute numbers only                    "int " is keyword of the integer variables
  • Float -     Float is a like a non absolute variables like 3.8 (or) 7.9 " float " is a                            keyword of the float
  • String -       String datatype is a using some words (or) sentence also used 
  • character - character is like a one letter used here that letter not only define as a                       Captial letter (or) small letter it should have both is assesible but it                           have only one letter using at the time and the keyword of the                                     character  is " char "
  • Double - it is also like a float but it should have restricted to put the values in                         after  the dot


Integer datatype :

-------------------------------------------
| int number = 15;                      |
| System.out.println(number); |
-------------------------------------------


Float Datatype:

-------------------------------------------
| float number = 1.5;                 |
| System.out.println(number); |
-------------------------------------------

Charcter Datatype:


-------------------------------------------
| char number = 'A';                 |
| System.out.println(number); |
-------------------------------------------

string Datatype:


-------------------------------------------
| String number =  "apple";      |
| System.out.println(number); |
-------------------------------------------


Double Datatype :

-------------------------------------------------------------------------
| double number =  4.94065645841246544e-324d;      |
| System.out.println(number);                                     |
--------------------------------------------------------------------------



Comments

Popular posts from this blog

what is java | how to use Java | best Programming Language | how to create a class | java basic syntax | what is syntax | syntax in java

What is java | learn java | learn java in tamil | easy to learn java| how to learn java|examples in java