What is the correct answer?


Which key word can protect a class in package from accessibility by the classes outside the package?

A. private

B. protected

C. final

D. don't use any keyword at all(make it default)

Correct Answer :

D. don't use any keyword at all(make it default)

Related Questions

For all insert, update, delete, query operations on a database, ResultSet… A static class method can be invoked by simply using the name of the method… If you want to assign a value of 99 to the variable year, then which of… Which exception is thrown by the read() method of InputStream class? Frames and applets cannot be used together in the same program. It is an error if a class with one or more abstract methods is not explicitly… All methods in an abstract class must be declared abstract. In RMI before running the client program we must start RMI Registry. An EJB is a server-side component that encapsulates the business logic… What does the following line of code do?TextField text=new TextField(10); The default case is always required in the switch selection structure. When we invoke repaint () for a Component, the AWT invokes the method: Given the codeString s = new String("abc");Which of the following calls… It is an error to have a method with the same signature in both the super… We can add more than one class(es) at the time of compilation Java Beans. In order to connect to a database through java program we must create… The concept of multiple inheritance is implemented in Java by Two methods cannot have the same name in Java. Which of the following represent legal flow control statements? A class may be both abstract and final. Which of the following represent legal flow control statements? Which of the following will produce a value of 22 if x=22.9: Which of the following methods can be used to draw the outline of a square? Message-Driven beans act as a listener for the Java Message Service API,… It is perfectly legal to assign a subclass object to a supper class reference. Session bean Throwing an exception always causes program termination. Servlet can have ___________ DataInput is Which of the following are the wrapper classes?