English, asked by spoken2117660020022, 10 months ago

Which of the following is a valid declaration of an object of class Box?
Select one:

Box obj=new Box();

new Box obj;

obj= new Box()

Box obj=new Box;

Answers

Answered by yuvraj99975
10

Explanation:

mate option d is the correct answer that is Box obj = new Box;

BROTHER PLEASE MARK IT AS BRAINLIEST PLEASE

Answered by lovingheart
1

The answer is Box obj= new Box.

Explanation:

  • In object oriented programming, the class object will be formed with the help of the new keyword.
  • The class box contains various attributes that helps the user to create an object.
  • While declaring an object, the user needs to create a class and then the name of the object will be given and they can be initialized in the program with the help of the class name followed by an object name.

To know more:

1) Class and objects are inter-related. Explain.

https://brainly.in/question/11624359.

2) Give 10 real life example of class and object​

https://brainly.in/question/15276572

Similar questions
Math, 10 months ago