Menu
Question Index
...

Write a program to print the student details as shown in the requirements.

Input (Student) Output (Printed Statement)
'MeritCampus', 'A', 89.0 [MeritCampus - A - 89.0]
'Mobeen', 'B', 82.0 [Mobeen - B - 82.0]
'Vasavi', 'C', 85.0 [Vasavi - C - 85.0]
'Suma', 'A', 69.0 [Suma - A - 69.0]
'Prabhas', 'C', 65.0 [Prabhas - C - 65.0]



class PrintStudentDetails
{
    public static void main(String s[])
    {
        Student student = new Student("MeritCampus", 'A', 89.0);
        printStudentDetails(student);

    }


    public static void printStudentDetails(Student student) {
    }

}
class Student {

String studentName;
char section;
double average;

public Student(String studentName, char section, double average) {
this.studentName = studentName;
this.section = section;
this.average = average;
}

@Override
public String toString() {
}
}

Doubts

Problems

Topic: Java String Conversion - toString() Method In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App