In this example we see how we can declare basic character variable.
How we assign values in them and how we can increment them.
In this example we see how we can declare basic character variable.
How we assign values in them and how we can increment them.
In this example we see, how to store floating-point variable.
'float'- 'float' specifies a single-orecision value that uses 32 bits of storage.
We need different types of integer variables to store different range of integer.
In this example we use int,short and long integer variable to store different integer.
Here, we ask user for a String specifically a int. Then we try to convert it. But if it fails, we catch the exception.
Here we try to access an index of an array that is out of bounds. We show what happens.
This example describes that how to access a class level variable without creating a reference object
and 'final' keyword by which we keep the value of a variable as constant.
The program below demonstrates for a given date (gregorian calendar) the corresponding day of the week is printed out.
This example basically describes a way for data over-write of a class level variable and how to access value of that class level variable.
The program below converts a number of bytes given as an int value such that the best metric unit is chosen for representation.