Lesson 25 of 34
Classes and Objects
10 min 30 XP
Java is object-oriented. A class is a blueprint with fields (data) and methods (actions). We create objects from it with new, and each object has its own values.
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.A file can have only one public class. Write your other classes above Main without the word public.