Primitive data types:
Java (like most languages) has anumber of primitive data types:
- numeric types to represent integers within various ranges;
- numeric types to represent non-integernumbers;
- a character type;
- a logical type.
Associated with every primitive type is a set of literal values. For example, the character 4 in aprogram is a literal value of the type known as int (a type usedtostore integers). Literas have fixed values. The character 4 always means the same thing. In contrast, a variable can contain different values at different times, so its meaningisnot fixed. One way of storing avalue inavariable is by assigning aliteral value to the variable. For example, we could write:
int newVal =4;
Declaration and initialization
We discussed how we can reserve memory locations for storing values of any primitive type. Those memory locations can then be made to contain values that are legal for the particular type. This involves two steps.
1 Create avariable of the type you want to use. This step is called declaration or declaring avariable.
2 When you first store something useful in avariable's memorylocation, we call it initialization or initializing avariable.
Java Assignment Help - Java Homework Help
Struggling with java programming language? Are you not finding solution for your Primitive data types homework and assignments? Live Primitive data types experts are working for students by solving their doubts & questions during their course studies and training program. We at Expertsmind.com offer Primitive data types homework help, java assignment help and Primitive data types projects help anytime from anywhere for 24x7 hours. Computer science programming assignments help making life easy for students.
Why Expertsmind for assignment help
- Higher degree holder and experienced experts network
- Punctuality and responsibility of work
- Quality solution with 100% plagiarism free answers
- Time on Delivery
- Privacy of information and details
- Excellence in solving java programming language queries in excels and word format.
- Best tutoring assistance 24x7 hours