Table Comparing C, C++ and Java
This table is a summary of the differences found in the article.
Feature | C | C++ | Java |
Paradigms | Procedural | Procedural, OOP, Generic Programming | OOP, Generic Programming (from Java 5) |
Form of Compiled Source Code | Executable Native Code | Executable Native Code | Java bytecode |
Memory management | Manual | Manual | Managed, using a garbage collector |
Pointers | Yes, very commonly used. | Yes, very commonly used, but some form of references available too. | No pointers; references are used instead. |
Preprocessor | Yes | Yes | No |
String Type | Character arrays | Character arrays, objects | Objects |
Complex Data Types | Structures, unions | Structures, unions, classes | Classes |
Inheritance | N/A | Multiple class inheritance | Single class inheritance, multiple interface implementation |
Operator Overloading | N/A | Yes | No |
Automatic coercions | Yes, with warnings if loss could occur | Yes, with warnings if loss could occur | Not at all if loss could occur; msut cast explicitly |
Variadic Parameters | Yes | Yes | No |
Goto Statement | Yes | Yes | No |
Algorithmic Efficiency and Sorting and Searching Algorithms
- Algorithmic Efficiency and Big-O notation How to determine the efficiency of your program and understand common algorithms
- Efficiency, Time and Space Learn how time and space are balanced in the design of algorithms
- Search Algorithms Covers various techniques for search algorithms, from linear search to advanced versions of binary search
- Comparison of Sorting Algorithms See how the various sorting algorithms compare (and how to compare them) and pick which ones to use
- Intro to sorting algorithms: bubble sort Learn about sorting algorithms, bubble sort, and how it compares to other sorting methods
- Selection sort and Insertion sort Two sorting algorithms usually superior to bubble sort
- Heap Sort A sorting algorithm based on heaps that runs in O(nlog(n)) time.
- Merge Sort A stable sort running in O(nlog(n)) time, generally faster than heap sort, but requiring scratch space.
- Quicksort [By Jakub Bomba (axon)] Quicksort is the fastest sort in the average case, requires no additional space, and is stable
- Radix Sort Learn about radix sort, a special case sorting algorithm for certain inputs
No comments:
Post a Comment