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
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
5
Correct Question:-
Select which one of these is used to create an object rollno of class subject
- subject rollno = new sub();
- rollno subject = new rollno();
- 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
Math,
15 days ago
English,
15 days ago
Math,
15 days ago
English,
1 month ago
Social Sciences,
1 month ago
Social Sciences,
9 months ago
Math,
9 months ago