ackage edu.umsl; interface Jumpman { void jump(); default void swingHammer() { // Code to swing hammer } } public class Main implements Jumpman { public static void main(String[] args) { } } What would you, as the programmer, need to minimally do, if anything, to fix the above code? Group of answer choices Class 'Main' must either be declared abstract or implement abstract methods 'jump()' and 'swingHammer()' in 'Jumpman'. Nothing, this code works as is. Class 'Main' must either be declared abstract or i
ackage edu.umsl; interface Jumpman { void jump(); default void swingHammer() { // Code to swing hammer } } public class Main implements Jumpman { public static void main(String[] args) { } } What would you, as the programmer, need to minimally do, if anything, to fix the above code? Group of answer choices Class 'Main' must either be declared abstract or implement abstract methods 'jump()' and 'swingHammer()' in 'Jumpman'. Nothing, this code works as is. Class 'Main' must either be declared abstract or i
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 20RQ
Related questions
Question
package edu.umsl;
interface Jumpman {
void jump();
default void swingHammer() {
// Code to swing hammer
}
}
public class Main implements Jumpman {
public static void main(String[] args) {
}
}
interface Jumpman {
void jump();
default void swingHammer() {
// Code to swing hammer
}
}
public class Main implements Jumpman {
public static void main(String[] args) {
}
}
What would you, as the programmer, need to minimally do, if anything, to fix the above code?
Group of answer choices
Class 'Main' must either be declared abstract or implement abstract methods 'jump()' and 'swingHammer()' in 'Jumpman'.
Nothing, this code works as is.
Class 'Main' must either be declared abstract or implement abstract method 'jump()' in 'Jumpman'.
Class 'Main' must implement abstract method 'swingHammer()' in 'Jumpman'.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,