I’m not particularly stuck on this exercise. However, I do not understand Classes at all. Like whats the use of it, why is it written in such a way and so on. Right now, I’m just doing the exercise by copying, i honestly don’t understand what its trying to teach.


class Dog {

int age;

public Dog(int dogsAge) {

age = dogsAge;


<do not remove the three backticks above>

each programming language has its own syntax. There isn’t much to understand much about syntax, you have to learn it

Java is very object orientated focussed, maybe not the right language to start with then?

You can always find other sources to read about objects:

1 Like

Hmmm, okay. I’ll look it up. Thanks

Classes are mostly used as blueprints for objects
(sometimes they’re just used to group things together, without creating any instances)

So if you wanted to have car objects you’d have a class with fields for engine, wheels, brand, etc and you’d also have methods which implement the behaviour like driving or handling the locks

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.