Which correctly declares a class Test in package com.example?

Which correctly declares a class Test in package com.example?

Which correctly declares a class Test in package com.example?

A.
package com.example {
class Test {
// some code here
}

B.
package com.example;
public class Test {
// some code here
}

C.
public class com.example.Test {
// some code here
}

D.
import com.example;
public class Test {
// some code here
}



Leave a Reply 0

Your email address will not be published. Required fields are marked *