What is Database Architecture

Image
Database  Architecture  Database store a lot of critical information to access data quickly and security we need to select the correct architecture for efficient data for management client for the machine is the database architecture client  . Database management system architecture help user to get their into a request done file connecting with database . We choose the database architecture based on the following factures  1.Size of the database                                                                            2.Number of users                                                                      ...

What is Constants, Variables, and Data Types

                                          Constants 

Constants in java refer to fixed values do not change during the execution of a program , Java support several types  of constants as illustrated.



.Integer Constants   

An integer constant refer to a sequence of digits , There are three types integers .namely decimal imager octal integers and hexadecimals integers . Decimal integers consist of a set of thing preceded by an optional minus sign Valid of decimals integer constant 

.Variables 

A variable is an identifier that denotes a storage location seed to store a data value unlike constant that remain unchanged during the execution of a program , a variable may take different values at different times during the execution of the program ,we had used several variable for instance , we used variables length and breath to store the values of length and breath of a room

.A variable name can be by the programmer in a meaningful way so as to reflect what it represents in the program , Some of variable names                                                                                                  .Average                                                                                                .Height                                                                                                .Total Height                                                                                        .Class Strength 

As mentioned earlier , variable names may consist of alphabet ,digits the underscore(_) and dollar characters subject to the following condi conditions.

1.They must not begin with a digit                                                        2.Uppercase and lowercase are distinct. This means that the variable total is not the same as total                                                                  3.It should not be a keyword.                                                                4.White space is not allowed.                                                              5.Variable names can be of any length.

.Data Types 

Data types variables in java has a data , Data types specify the size and type of values that can be stored , java language is rich in its data types, The variety of data types variables allow the programmer to select the type appropriate to the needs of the applications , Data type in java under various categories are shown ,primitive types (also called built in types) are discussed in details in this chapter derived types (also known as reference types) are discussed letter and when the are encountered. 




.Integer Types

Integer types can hold whole numbers such as 123,-35 and 8757.The size of the values that can be stored depends on the integers data type we java support four type of integers as shown in. They are byte, short, int and long. Java does not support the concept of unsigned  types and therefore  all java values are signed meaning they can be positive and negative. show the memory size and range of all the four integers data types

.Types

Byte   One Byte   -128     127                                                                Short   Two Bytes        -32,768   32,767                                              Int  Four Bytes     -2,658,543,876    2, 658,543,875                            long   Eight Bytes    -9,765,645,765,765     9,765,645,765,764

It should be remembered  the wider data type required more time for manipulation and therefore it is advisable to use smaller data types, wherever possible. instead of storing  a number like 50 in a int type a variable , we must use a byte variable to handle this number, This will improve the speed of execution of the program. we can make integers long by appending the letter L or 1at the end of the number.

.Floating point types    

Integers types can hold only whole numbers and therefore we use another type known as floating point type to hold number containing fractional part such as 76.54 and -1.546 (known as floating points constant). There are two kinds of floating points storage in java as shown                                        

.The float type value are single-precision number while number the double types represent double-precision numbers.     

 




Comments

Popular posts from this blog

What is Computer engineering, complete information

What is Diploma Engineering and How to Diploma engineering free course