There are only two kinds of languages: the ones people complain about and the ones nobody uses. -Bjarne Stroustrup
Programming can be a very daunting process and learning to program is pain on its own for beginners like you and me. But fear not as I will be sharing my learnings every day here, so you can learn with me too. But before jumping into Code let's clear up our basics.
Types of Language
Procedural
Functional
Object-Oriented
1. Procedural
The procedural language specifies a series of well-structured steps and procedures to compose a program.
The procedural language contains a systematic order of statements, functions, and commands to complete a task.
2. Functional
- Functional Programming is all about writing codes in blocks so that the code can be reused without writing it again and again.
3. Object-Oriented
- Object-Oriented programming revolves around objects.
- What is an object? Your code + some data = object.
Static vs Dynamic Language
Static
- Performs type checking at compile time.
- Errors will show at compile time.
- Datatypes are declared before using them.
- Gives more control to the developer.
Dynamic
- Performs type checking at runtime.
- Error might not show till the program is run.
- Datatypes aren't required to be declared for the variables.
- Saves time in writing code but might error at runtime.
Stack and Heap Memory
Stack and Heap memory management is one of the most important concepts in data structures and algorithms(in java).
How do stack and heap memory management work? Let's suppose you have a value of 10 and you want to store that value for future use. So for storing the value of 10 you assign a variable x. Now, we have something like x = 10. In Java, this variable and value are stored in stack and heap memory respectively and when needed we just call for x.
More about garbage collection and architecture of Java in the next blog