What is the correct answer?


We would like to make a member of a class visible in all subclasses regardless of what package they are in. Which one of the following keywords would achieve this?

A. private

B. protected

C. public

D. private protected

Correct Answer :

D. private protected

Related Questions

Which of the following string can be used as mode string for creating… DataInput is Which exception is thrown by the read() method of InputStream class? We can add more than one class(es) at the time of compilation Java Beans. When we invoke repaint () for a Component, the AWT invokes the method: With javadoc, which of the following denotes a javadoc comment? Which of the following command lines options generates documentation for… Which of the following statements are true? JSP files creates ________________ If m and n are int type variables, what will be the result of the expression'm… All the bitwise operators have the same level of precedence in Java. An EJB is a server-side component that encapsulates the business logic… The default case is always required in the switch selection structure. When present, package must be the first no comment statement in the file. Declaring a method synchronized guarantees that the deadlock cannot occur. Which of the following are not keywords? What does the following line of code do?TextField text=new TextField(10); A class may be both abstract and final. Which of the following methods can be used to change the size of a size()… Given the codeString s = new String("abc");Which of the following calls… Servlet can have ___________ We can over load methods with differences only in their return type. Which of the following will produce a value of 10 if x = 9.7? class.forName(...) creates an instance of java ODBC driver What is error in the following class definitions? abstract class… Message-Driven beans act as a listener for the Java Message Service API,… The programmer must explicitly create the system .in and system .out objects. Which of the following methods can be used to remove a component from… A variable declared inside the for loop control can not be referenced… In evaluating a logical expression of type 'Boolean expression 1&& Boolean…