Too Long; Didn't Read
Blockchains are designed to be immutable. Here we will design a simple blockchain that will help you understand how hashing makes a blockchain immutable with just a few lines of Java Code. This is just a demo blockchain, real blockchain involves a lot of other things such as consensus mechanisms, digital signatures, Merkle Tree, etc.. This code sample will be beneficial for an ideal purpose. The first block in a blockchain is a Genesis block. The genesis block is almost always hard coded into the software of the applications that utilize its blockchain. For every new block that is generated afterward, we are going to use the previous block’s hash as input to determine its block hash.