2. Reply to another student’s post. Suggest another way to take advantage of the dynamic binding in that code. Write the main method to demonstrate the correct functionality of the additions/modifications. As you reply to the other students, try to reply to a post that does not have a reply yet, and if not; try to reply to a post with a fewer number of replies.
This is the reply of the student that needs to modified or fixed for a response
public class Main{
// Sneakers Class
public static class sneakers {
// Method of Sneakers class
void print() {
// Print statement
System.out.println(
“Nike’s are my favorite sneakers”);
}
}
public static class subsneakers extends sneakers {
// Method of Subclass
@Override void print() {
// Print statement
System.out.println(
“Retro Jordan’s are my favorite to be more specific”);
}
}
// Method of main class
public static void main(String[] args){
// Constructor of super class
sneakers A = new sneakers();
// Constructor of sub class
sneakers B = new subsneakers();
// Calling print method
A.print();
B.print();
}
}