JavaRush /Courses /New Java Syntax /Practice with constructors

Practice with constructors

New Java Syntax
Level 10, Lesson 6
Available

"I can see that you've already rested. Great! Here are some tasks to practice creating constructors:"

10
Task
New Java Syntax, level 10, lesson 6
Locked
You can't buy friends
You can't buy friends
10
Task
New Java Syntax, level 10, lesson 6
Locked
The basis of a wheel
The basis of a wheel
10
Task
New Java Syntax, level 10, lesson 6
Locked
Populate the Rectangle class
Populate the Rectangle class
10
Task
New Java Syntax, level 10, lesson 6
Locked
Constructor
Constructor
10
Task
New Java Syntax, level 10, lesson 6
Locked
Creating cats
Creating cats
10
Task
New Java Syntax, level 10, lesson 6
Locked
Calling a constructor from a constructor
Calling a constructor from a constructor
10
Task
New Java Syntax, level 10, lesson 6
Locked
Max constructors
Max constructors
Comments (2)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
18 December 2025
The fourth contructor should be: public Circle(Circle oc) { this(oc.x, oc.y, oc.radius); } but instead of it - in solution it is: public Circle(double x) { ...}
Daniel Alien Level 21
2 December 2025
Interesting fact: If a class doesn't declare any constructors, the Java compiler automatically provides a default constructor (a no-argument constructor) for us. However, if there is any declared constructor, the compiler will not provide the default one.