0Which of the following demonstrates the implementation of inheritance in Java?Aclass B inherits A {}Bclass A contains B {}Cclass A implements B {}Dclass A extends B {} Correct answer: D ExplanationIn Java a class inherits another class with the extends keyword, so "class A extends B {}" is correct. Join the discussion Report an error Share