Why is all C# and Java code written in a class?

As someone who recently started programming this has been quite confusing for me. Aren’t classes just for a blueprint of creating objects?

As far as I know:
C# and Java are object-oriented languages. That means you have objects that interact with eachother. For example a CAR is an object but is made from other objects like tire,seat etc. So initially your application is an object in itself and is made from other object that you need for the program to work.
You can read about it here: What is Object-Oriented? - Definition from Techopedia :slight_smile:

1 Like