Computer Science, asked by nuzhatkhan7865, 1 month ago

3 points
3. Select which one of these is used
to create an object rollno of class
subject
O subject rollno = new sub();
O rollno subject = new rollno();
subject rollno = new subject();

Answers

Answered by atrs7391
4

Select which one of these is used to create an object rollno of class subject

1. subject rollno = new sub();

2. rollno subject = new rollno();

3. subject rollno = new subject(); ✔✔

Answered by BrainlyProgrammer
5

Correct Question:-

Select which one of these is used to create an object rollno of class subject

  1. subject rollno = new sub();
  2. rollno subject = new rollno();
  3. subject rollno = new subject();

Answer:-

  • Option 3:- subject rollno =new subject();

Syntax of creating an object of a class...

class obj = new class();

Learn more!!

  • Class is a blueprint or prototype of an object that describes the data members and functions to be used in the operations.
  • Object is a unique entity which possess the different characteristics (data) and common behaviour (function) described within the class
Similar questions