Java for Beginners:
Most
of you are familiar with C-programming I guess. You may have learnt in college.
Engineering students will have C-program as one of their academic subject in 1st
or 2nd semester. Don’t you
think that its’ always better to start learning new subjects by comparing with
related subjects that you have learnt before. Yes I think it is the best way to
learn, it will help you in both understand and remembering the subject well.
More over this approach of learning is the best suited for learning and
understanding new programming concepts.
Core-Java
|
C-Programming Language
|
||
Object-Oriented programming.
|
Procedural or Structural programming.
|
||
No concept of pointers in java.
|
Pointer is one of the important concepts in
c-programming.
|
||
Output statement look like:
System.out.println();
|
Output statement look like:
printf();
|
||
We in java deal with concepts like encapsulation, inheritance, polymorphism
& abstraction.
|
In C, we don’t find such concepts.
|
||
Multithreading is possible in Java.
|
U don’t see multithreading here.
|
||
Widely used for application development.
|
Mainly used for system-level programming.
|
||
Subroutines are called methods.
|
Subroutines are called functions.
|
||
Presence of garbage collector. Memory
de-allocation is done automatically when object has no reference.
|
Garbage collector is absent. Memory
management has to be don’t manually.
|
||
Widely used for application development.
|
Mainly used for system level programming.
|
||
Primitive Data
Types:
|
Primitive Data
Types
|
||
Integers
|
byte
|
Integers
|
Int & unsigned int
|
short
|
Short int & unsigned short int
|
||
int
|
Long int & unsigned long int
|
||
long
|
|||
Floating-Point
|
Float
|
Floating-point
|
float
|
Double
|
Double & long double
|
||
Character
|
void
|
||
Boolean
|
|||
Decision
making, branching and looping statements mostly the same in both languages.
But in java we have ‘for each’ loop which is not found in C.
|
The table shows you the
differences and similarities between Java and C-programming language. I hope
that this may have helped you in understanding a little about what you have to study actually
in java.