is executed if none of the other functions match the function identifier or no data was provided with the function call.
Only one unnamed function can be assigned to a contract and it is executed whenever the contract receives plain Ether without any data.
// This fallback function will keep all the Ether
function() external payable {
balance[msg.sender] += msg.value;
}
Contracts receiving ETH without a payable function call and without a fallback function will throw an exception. Therefore, cannot receive ETH.
However, there are some exceptions to this; You cannot completely avoid receiving ETH: