programming language generations

First-generation language
Machine language programming.
The toggling of individual memory locations (by switch or other means)
In a first-generation language there is almost no abstraction.
Second-generation languages
Card readers and assembly language
In assembly language the programmer uses mnemonic codes like MOV to represent particular bit sequences.
These codes mapped directly to individual instructions on the CPU, and memory was still addressed directly.
One code meant exactly one CPPU instruction. (More modern assembly languages don't always map as directly to the CPU as the older ones did.)
Third-generation:
The first high-level programming language, Fortran.
Don't have to keep track of the location of variables in memory
In a third-generation language you tell the computer the algorithms and data structures it should use to calculate the results you want; but you use more abstract logical and mathematical operators rather than directly manipulating addresses in memory and CPU instructions.
In a third-generation language, statements represent several machine instructions.
These languages may be compiled or interpreted.
Java is a very advanced third-generation language.
Most of the other computer languages you're probably familiar with: Fortran, basic, C, C++, Cobol, Pascal, as well as most of the ones you're not familiar with (AppleScript, Frontier, Eiffel, Modula-3, ADA, PL/I, etc.) are also third-generation languages (or 3GLs for short).
Fourth-generation:
Fourth-generation languages (4GLs) moved the abstraction level a step higher. In these languages you tell the computer what results you want rather telling it how to calculate those results. For instance you would ask for the total sales for the year, without specifying the loops necessary to sum all the sales of all the salespeople.
Perl, PHP, Python.
SQL is the most popular fourth-generation language.