204k views
3 votes
Objects of the calculator class require no additional information when created. define an object named calc, of type calculator.

2 Answers

4 votes

In Java you can define a new object with:

Calculator calc;


or you can define and instantiate with:

Caculator calc = new Calculator();

User Satinder
by
6.2k points
2 votes

Answer

calculator calc;

Step-by-step explanation

An object is an instance of a class. And a class is what defines or describes the behavior or the state of the object of its type. When a class is defined no memory is allocated until when an object is created memory is allocated.

User Christian Jensen
by
5.2k points