Display the two attributes studid and studgrade


Discuss the below:

Here is a public class called Student

Public class Student {
public int studID = 0;
public char studGrade = 'F';}

Q: Use Notepad to write a test class called testStud.java which will instantiate an object called myStudent. Use the object to write print statments to print the current values of the two attributes. Next, use the object to change the studID to 127 and the studGrade to an A. Write code that will display the two attributes studID and studGrade.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Display the two attributes studid and studgrade
Reference No:- TGS01935892

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)