Professional Documents
Culture Documents
Difference Between C, C++ and Java
Difference Between C, C++ and Java
5. Comments:- /*….*/ (multi line Comments:- /*….*/ (multi line Comments:- /*….*/ (multi
comment), //(single line comment) comment), //(single line line comment), //(single line
comment) comment), /** ….
*/(documentation comment)
6. Data types :- Data types :- Data types:-
int,char,float,double,void int,char,float,double,void byte,short,int,long,
float,double,
char,boolean
7. Bitwise shift operators are : >> Bitwise shift operators are : >> Bitwise shift operators are :
(right shift),<<(left shift) (right shift),<<(left shift) >>(right shift),<<(left
shift),>>>(triple right shift
operator)
8. Char is 8 bits wide Char is 8 bits wide Java uses Unicode to
represent characters. It is 16
bits wide.
9. Preprocessor directives allowed Preprocessor directives allowed No preprocessor directives
Eg:- #include,#define Eg:- #include,#define
10. Variables need not be initialized Variables need not be initialized Variables must be initialized
before using it before using it before using it
11. Array should be declared Array should be declared Arrays are declared without
http://ugcnetsolved-computerscience.blogspot.in/2017/09/difference-between-cc-and-java.html 1/3
10/31/2017 DIFFERENCE BETWEEN C,C++ AND JAVA
0 Add a comment
http://ugcnetsolved-computerscience.blogspot.in/2017/09/difference-between-cc-and-java.html 2/3
10/31/2017 DIFFERENCE BETWEEN C,C++ AND JAVA
http://ugcnetsolved-computerscience.blogspot.in/2017/09/difference-between-cc-and-java.html 3/3