Java is a lot like C but the major difference between Java and C is that Java is an object-oriented language and has mechanism to define classes and objects. In an effort to build a simple and safe; language, the Java team did not include some of the C features in Java.
§ Java does not include the C unique statement keywords sizeof, and typedef.
§ Java does not contain the data types struct and union.
§ Java does not define the type modifiers keywords auto, extern, register, signed, and unsigned,
§ Java does not support an explicit pointer type.
§ Java does not have a preprocessor and therefore we cannot use # define, # include, and # ifdef statements.
§ Java requires that the functions with no arguments must be declared with empty parenthesis and not with the void keyword as done in C.
§ Java adds new operators such as instanceof and >>>.
§ Java adds labelled break and continue statements.
§ Java does not have “goto” control structure.
§ Java adds many features required for object-oriented programming.
1 comments:
Sir i want C Tutorial
Post a Comment