Home

The use of protected keyword to a member in a class will restrict its visibility as follows:

A. Visibility only in the class and its subclasses in the same package.

B. Visibility only inside the same package.

C. Visibility in all classes in the same package and subclasses in other packages.

D. Visibility only in the class where it is declared.

You can do it
  1. Which of the following will produce a value of 22 if x=22.9:
  2. Which are the valid ways to create DataInputStream streams?
  3. All the bitwise operators have the same level of precedence in Java.
  4. A method declared as static can not access non-static class members.
  5. Submit button always fires doPost(...)
  6. The import statement is always the first no comment statement in a Java program files.
  7. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  8. Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
  9. Java always provides a default constructor to a class.
  10. We would like to make a member of a class visible in all subclasses regardless of what package they…
  11. The expression (x == y && a<b) is true If either x == y is true or a<b is true.
  12. An individual array element that is passed to a method and modified in that method will contain the…
  13. It is an error to have a method with the same signature in both the super class and its subclass.
  14. putValue(...) method takes _____________________-
  15. Which key word can protect a class in package from accessibility by the classes outside the package?
  16. The use of protected keyword to a member in a class will restrict its visibility as follows:
  17. The length of a string object 's1' can be obtained using the expression s1.length.
  18. A thread can make second thread ineligible for execution by calling the suspend (-) method on second…
  19. The concept of multiple inheritance is implemented in Java by
  20. The setBackground() method is part of the class
  21. If you want to assign a value of 99 to the variable year, then which of the following lines can be used…
  22. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  23. If m and n are int type variables, what will be the result of the expression'm % n' when m = -14 and…
  24. Which of the following statements are true?
  25. When we implement an interface method, it should be declared as public.
  26. The programmer must explicitly create the system .in and system .out objects.
  27. In RMI we invoke client method from remote server
  28. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  29. In a single Servlet class we can use____________
  30. JdbcOdbcDriver is an object of Object class