The following classes are considered to be in different files, what will happen when you attempt to
Fantastic news! We've Found the answer you've been seeking!
Question:
The following classes are considered to be in different files, what will happen when you attempt to compile and run the main?
public class Main {
public static void main(String[] args){
Hebron hl;
hl = new PPU();
hl.greeting();
}
}
class Hebron(
public Hebron (){}
}
class PPU extends Hebron (
public PPU(){
public void greeting(){
System.out.println("Welcome to PPU"); }
Select one:
Oa. Output: Welcome to PPU
Ob. Runtime error
Oc. Compilation error
Od. Output: Welcome to Hebron
//
}
Related Book For
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba
Posted Date: