What a Java program looks like
 

Things you find in a Java program:

Statements are (always) inside a method !!!

Java is an Object Oriented Programming Language
 

Important property of Object Oriented Programming (OOP) Languages:

OOP (= a class) can restrict the access of certain components inside an object

What a C program looks like
 

Things you find in a C program:

Statements are (always) inside a function !!!

C is NOT an Object Oriented Programming Language (no "limiting qualifiers")
 

C is not an Object Oriented Programming (OOP) Languages:

All global variables and all functions can be used by statements in any function !

Comment: later addition to the C programming language
 

  • Later, C has added:

      • static global variables    

    that are only accessible by functions defined inside the same source program file

    (C took some protection ideas from OOP....)