previous |
start |
next
Some C and Java differences
- C has no class types
- C variables can be used even though not initialized
- C has pointer types and operators on pointers.
- C can allocate new memory with library function 'malloc',
specifying a number of bytes, not a data type; Java allocates new
memory with the new operator yielding an instance of some data
type
- C has no garbage collector; memory allocated with malloc, must
be explicitly released with the library function 'free'.
- C function declarations can be separate from the
implementations
previous |
start |
next