0

What's the wrong

// Fig. 3.5: GradeBookTest.java // Create GradeBook object and pass a String to  // its displayMessage method. import java.util.Scanner; // program uses Scanner public class GradeBookTest {    // main method begins program execution    public static void main( String args[] )    {        // create Scanner to obtain input from command window       Scanner input = new Scanner( System.in );       // create a GradeBook object and assign it to myGradeBook       GradeBook myGradeBook = new GradeBook();        // prompt for and input course name       System.out.println( "Please enter the course name:" );       String courseName = input.nextLine(); // read a line of text       System.out.println(); // outputs a blank line       // call myGradeBook's displayMessage method        // and pass courseName as an argument       myGradeBook.displayMessage( courseName );    } // end main } // end class GradeBookTest

1st Oct 2021, 8:44 PM
Salah Al_Salahi
Salah Al_Salahi - avatar
7 odpowiedzi
+ 1
Provide ur complete code. displayMessage(String msg) method implementation not shared
1st Oct 2021, 8:58 PM
Parith (Faree)
Parith (Faree) - avatar
+ 1
Ideally you should share your code in the code playground and post a link here. It makes it easier for people to read your code and it allows them to play around with it to see what's going on.
1st Oct 2021, 9:02 PM
Simon Sauter
Simon Sauter - avatar
1st Oct 2021, 9:03 PM
Salah Al_Salahi
Salah Al_Salahi - avatar
0
How?
1st Oct 2021, 9:02 PM
Salah Al_Salahi
Salah Al_Salahi - avatar
0
See here I made the cod but it does not work
1st Oct 2021, 9:06 PM
Salah Al_Salahi
Salah Al_Salahi - avatar
1st Oct 2021, 9:06 PM
Salah Al_Salahi
Salah Al_Salahi - avatar
0
write second class GradeBook with method displayMessage( .. )
2nd Oct 2021, 6:13 AM
zemiak