top of page
Writer's pictureRosario Riley

How to Declare Variable in Java Language?

Computers store all values ​​using bits (binary numbers). A bit can represent two values, and the value of a bit is usually said to be either 0 or 1.

To create a variable, you need to tell Java its type and name. Creating a variable is also called variable declaration. When you create a primitive variable, Java reserves enough bits in memory for that primitive type and maps that location to the name you use. We need to tell Java the type of the variable, because Java needs to know how many bits to use and how to represent the value.

All three different basic types are represented by binary numbers (binary numbers consisting of the digits 0 and 1), but in different ways. To practice converting between decimal and binary numbers, see:

When you declare a variable, a memory location (a contiguous number of bits) is reserved for variables of that type and a name is associated with that location. Integers get 32 ​​bits of space, double precision numbers get 64 bits of space, and boolean values ​​can be represented with only 1 bit, but the amount of space is not fixed by the Java standard.

Java Programming Language contains following topics at TCCI:

Basic Introduction to Java, Object Oriented Programming, Basic Data types and Variables, Modifier Types, Operators, Loop controls, Decision Making, Arrays and String, Methods, Inheritance, Interface, Package, Polymorphism, Overriding, Encapsulation, Abstraction, Exception, Inner class, File

Course Duration: Daily/2 Days/3 Days/4 Days

Class Mode: Theory With Practical

Learn Training: At student’s Convenience

TCCI provides the best training in Java through different learning methods/media is located in Bopal Ahmedabad and ISCON Ambli Road in Ahmedabad.

For More Information:                                    

Call us @ +91 9825618292

Recent Posts

See All

Comments


bottom of page