Question: Following program have compilation error, can you guess root cause of it? 1 abstract class VQCourse { 2. public String courseName; 3 public String courseID;
Following program have compilation error, can you guess root cause of it? 1 abstract class VQCourse { 2. public String courseName; 3 public String courseID; 4 } public class VirtuQCourseProvide extends VQCourse { 5 6 public static void main(String[jargs) { 7 VQCourse coursel = new VQCourse(); 8 course1.courseID = "0001"; 9 course1.courseName = "JAVA"; 10 System.out.println(course1.toString(); 11 }} O Protected means only inherited class and class have access to protected members. o abstract class VQ Course should have a implemented method. You cannot instantiate a abstract class.. Decare class VQ Course as final
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
