Given two files:.
1. package com.mypkg; 2. import com.mypkg2.*; 3. public class Main { 4. public static void main(String[] args) { 5. MyClass u = new MyClass(); 6. u.do1(); 7. u.do2(); 8. u.do3(); 9. } }
and the correctly compiled and located:.
1. package com.mypkg2; 2. class MyClass { 3. void do1() { System.out.print("do1 "); } 4. protected void do2() { System.out.print("do2 "); } 5. public void do3() { System.out.print("do3 "); } 6. }
What is the result for Main? (Choose all that apply.)
C, D, E, and F are correct.
class MyClass is not public so it CANNOT be accessed from a different package.