This is an easy Java question A class Course is defined in a package com.java2s.
ID: 3719177 • Letter: T
Question
This is an easy Java question
A class Course is defined in a package com.java2s. I location of the corresponding class file is Given that the physica /mycode/com/java2s/Course.class and execution takes place within the mycode directory, which of the following lines of code, when inserted at INSERT CODE HERE, will import the Course class into the class MyCourse? // INSERT CODE HERE /class MyCourse //Course c; import mycode.com.java2s.Course; import com.java2s.Course; import mycode.com.java2s; import com.java2s O import mycode.com.java2s* import com.java2s*;Explanation / Answer
ANSWER: Here option (A) is true because we import package as package name and . (dot) class name so here first option suits this and it is correct.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.