Blog Introductions

In this  blog contains tutorials about  HTML Tutorials, Python Tutorials, CSS Tutorials, How to, PHP Tutorials, Java Tutorials, C++ Tutorials, Tutorials,  Examples, Source code,Learning,
Tips and Software development  services. Java Variables  and its Types  |  Java tutorials Bestitworriors


Java Variables  and its Types 


Java tutorials




Java Variables  and its Types  |  Java tutorials Bestitworriors - Variables use to hold specific data and information in them.If we have different type of data then we use different type of variables.Java support String, int , Float , Char , Boolean.Sring or int are the types of variables which tell us that which type of data will store or stored in this variable.We declear variable datatype variable_name eg. int variable_name.



Some Key Points of Java Variables




  1. Variable use to hold data and information in them.
  2. Java use data type with the variable
  3. String variable store text data in it
  4. Int Store integer number without decimals
  5. Float store floating points number with the decimals
  6. Char store single character
  7. Boolean store values with two states true or false



Code


public


class variabless {

public static void main(String[] args) {

int firstint = 5;
float firstfloat = 5.99f;
char firstchar = 'D';
boolean firstbool = true;
String firststring = "Best it warrior is best platform";


System.out.println("My firt integer:"+firstint);
System.out.println("My firt Foat:"+firstfloat);
System.out.println("My firt Char:"+firstchar);
System.out.println("My firt Bool:"+firstbool);
System.out.println("My firt String:"+firststring);

}

}



OutPut


My firt integer:5
My firt Foat:5.99
My firt Char:D
My firt Bool:true
My firt String:Best it warrior is best platform


I hope You really enjoyed this blog . I try my best to make every thing is easy and helpfull to provide to public .You will get more blog about the Programing project and code . Thanks for visiting my blog if you have any querry related to this you can comment here i will try my best to response you back about Java Variables  and its Types  |  Java tutorials Bestitworriors