Uploaded by Burak Ersoy

Yeni Microsoft Word Belgesi

advertisement
Seman�cs refers to the meaning and behavior of a program. It includes the concepts of data types,
variables, constants, expressions, statements, func�ons, classes, objects, inheritance, polymorphism,
excep�on handling, memory management, concurrency, and input/output.
C and Java have some similari�es in their seman�cs. They both use primi�ve data types (such as int,
char) to store basic values and derived data types (such as arrays) to store collec�ons of values. They
both use variables to store data in memory and constants to store fixed values. They both use
expressions to compute values from operands and operators. They both use statements to perform
ac�ons or control the flow of execu�on. They both use func�ons (or methods) to group related code
into reusable units.
However, C and Java also have some differences in their seman�cs. C is a procedural language that
focuses on func�ons as the main unit of abstrac�on. Java is an object-oriented language that focuses
on classes as the main unit of abstrac�on. C does not support classes or objects as na�ve data types.
Java supports classes or objects as na�ve data types that can have atributes (fields) and behaviors
(methods). C does not support inheritance or polymorphism as na�ve features. Java support
Download