...
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024

OOPS

Question 123
From the following java determine the attributes of the class students:
Class student
{
String name;
Int marks;
};
Public static void main()
{
Student S1=new student();
Student S2=new student();
}
A
Only name
B
Both name and marks
C
Only S1
D
Both S1 and S2
Question 123 Explanation: 
→ The attributes of student class are name and marks.
→ There are two objects created in the above program and both have same attributes.
Correct Answer: B
Question 123 Explanation: 
→ The attributes of student class are name and marks.
→ There are two objects created in the above program and both have same attributes.

Leave a Reply

Your email address will not be published. Required fields are marked *