Please help me! 1. Make this code compile class MakeCompile { public static void
ID: 3553188 • Letter: P
Question
Please help me!
1. Make this code compile
class MakeCompile
{
public static void main(String [] args)
{
Other oref = new Other();
}
}
class Demo
{
abstract void meth();
}
class Other extends Demo
{
}
2. Make this code compile
class StartHere2
{
public static void main(String [] args)
{
Other oref = new Other();
}
}
Class Demo
{
abstract void meth();
abstract void good();
public void solid()
{
System.out.println("solid");
}
}
class Other extends Demo
{
public void major()
{
System.out.println("major");
}
abstract public void extra();
}
Explanation / Answer
1. class MakeCompile
{
public static void main(String [] args)
{
Other oref = new Other();
}
}
abstract class Demo
{
abstract void meth();
}
class Other extends Demo
{
void meth() {
}
}
2.
class StartHere2
{
public static void main(String [] args)
{
Other oref = new Other();
}
}
abstract class Demo
{
abstract void meth();
abstract void good();
public void solid()
{
System.out.println("solid");
}
}
class Other extends Demo
{
public void major()
{
System.out.println("major");
}
public void extra(){
}
void meth() {
}
void good() {
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.