The fetch decode execute cycle is the basic operational process of a computer system.
<h2>Option D: a call to a private method of the superclass</h2>
Explanation:
Option a: a method with the "same signature" is allowed in the subclass. There will not be any confusion because the object which is trying to call the method will decide whether to call the sub class or super class.
Option b: a call to a super class constructor is possible because, when you create an object of sub class automatically the super class constructor will be called. Even the sub class constructor can call the super class constructor explicitly.
Option c: A subclass can create method that's not defined by the super class
Option D: a private method is private inside the class and hence even the object of that class cannot access.
Answer:
Isnt there another thing that is supposed to be there like some website
Explanation:
Answer:
class Case //Case class
{
String owner_name,color; //members to store information name and color
Case(String name,String color) //constrictor with two parameters
{
this.owner_name = name; //members initialization
this.color = color;
}
public String getName() //to get name
{
return owner_name;
}
public String getColor() //to get color
{
return color;
}
public String toString()//override string method
{
return "Case Owner: " + owner_name + ", " + "Color: "+ color;
}
}
class Main //test class
{
public static void main(String args[])
{
String na,color;
Case c = new Case("Joy","Green"); //create instance of class Case and set constructor parameters
na = c.getName();
color = c.getColor();
System.out.println(c);//print statement tp print instance of a class
System.out.println(c.toString()); //print with override toString
}
}
Explanation: