An address is a 20 bytes data type. It is specifically designed to hold account addresses in Ethereum, which are 160 bits or 20 bytes in size. It can hold contract account addresses as well as externally owned account addresses. Address is a value type and it creates a new copy while being assigned to another variable.
Address has a balance
property that returns the amount of Ether available with the account and has a few functions for transferring Ether to accounts and invoking contract functions.
It provides the following two functions to transfer Ether:
transfer
send
The transfer
function is a better alternative for transferring Ether to an account than the send
function. The send
function returns a boolean value depending on successful execution of the Ether transfer while the transfer
function raises an exception and returns the Ether to the caller.
It also provides the following three functions for invoking the contract
function:
Call
DelegateCall
Callcode