Home

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

You can do it
  1. When present, package must be the first no comment statement in the file.
  2. Which of the following will produce a value of 22 if x=22.9:
  3. A method declared as static can not access non-static class members.
  4. class.forName(...) creates an instance of java ODBC driver
  5. Which of the following command lines options generates documentation for all classes and methods?
  6. It is an error to have a method with the same signature in both the super class and its subclass.
  7. Members of a class specified as private are accessible only to the methods of the class.
  8. Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
  9. The length of a string object 's1' can be obtained using the expression s1.length.
  10. In evaluating a logical expression of type 'Boolean expression 1&& Boolean expression 2', both the Boolean…
  11. To delete a file, we can use an instance of class file.
  12. Which of the following statements are true?
  13. With javadoc, which of the following denotes a javadoc comment?
  14. Servlet can have ___________
  15. An EJB is a server-side component that encapsulates the business logic of an application
  16. The setBackground() method is part of the class
  17. Which of the following statements are valid array declarations?
  18. Which of the following are not keywords?
  19. What is error in the following class definitions? abstract class xy { abstract sum(int x, int y)…
  20. Java always provides a default constructor to a class.
  21. Any method in a supper class can be over ridden in its subclass.
  22. The name of the RMI compiler is ___________
  23. Two methods cannot have the same name in Java.
  24. When the string objects are compared with ==, the result is true If the strings contain the same values.
  25. A JSP file can be stored_________________
  26. Objects are passed to a method by use of call-by-reference.
  27. Throwing an exception always causes program termination.
  28. It is an error to catch the same type of exception in two different catch blocks associated with a particular…
  29. The programmer must explicitly create the system .in and system .out objects.
  30. Which of the following keywords are used to control access to a class member?