Maps in Golang
Golang maps implements a hash table. Hash tables are one of the most used data structure. A hash table is an unordered collection of key-value pairs, where each key is unique.
Arrays in Golang
An array is a data structure with a fixed size containing elements (items) of the same type. Iterate over an array using for loop
or for range loop
.
Interfaces in Golang
Interfaces are collections of method signatures. A interface type can hold any value that implements those methods. The empty interface is an interface type that specifies zero methods. A type assertion provides access to an interface underlying concrete value. Two interfaces are equal if they have equal concrete values and identical dynamic types, or if both are nil.
Abstract keyword in Java
The abstract keyword is used in Java for abstraction. The abstraction is the process of selecting data and displaying only the relevant details to the object. If helps to reduce the programing complexity and the efort.
All keywords in Java
Keywords are special words in the programing language which have reserved use in the language. Keywords may not be used as identifiers in Java; for example you cannot declare a field whose name is a keyword.
How to generate a random int in Golang
In Golang there a are two libraries for generating random integers, one is a pseudo-random number generator (package math/rand
) and the second one is cryptographically secure random number generator (package crypto/rand
)