Static typing is a programming feature where the type of a variable is known at compile time, meaning that the type is checked before the program runs. This allows for early detection of type-related errors, making the code more predictable and easier to understand. Languages like Java and C++ are examples of statically typed languages.
In static typing, developers must explicitly declare the type of each variable, such as integer, string, or boolean. This can lead to better performance since the compiler can optimize the code based on the known types. However, it may require more upfront work compared to dynamically typed languages like Python.