Home

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)

You can do it
  1. A static class method can be invoked by simply using the name of the method alone.
  2. For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.
  3. An individual array element that is passed to a method and modified in that method will contain the…
  4. When we invoke repaint () for a Component, the AWT invokes the method:
  5. Which of the following statements are true?
  6. executeUpdate automatically updates data because___________
  7. Which are the valid ways to create DataInputStream streams?
  8. Which of the following represent legal flow control statements?
  9. EJBs can be of the following type(s)None of the above
  10. Which of the following methods can be used to remove a component from the display?
  11. It is an error if a class with one or more abstract methods is not explicitly declared abstract.
  12. The default case is always required in the switch selection structure.
  13. What is error in the following class definitions? abstract class xy { abstract sum(int x, int y)…
  14. With javadoc, which of the following denotes a javadoc comment?
  15. What is java -g used for?
  16. forName() is a static factory method
  17. Every method of a final in class is implicitly final.
  18. Given the codeString s = new String("abc");Which of the following calls are valid?
  19. Which exception is thrown by the read() method of InputStream class?
  20. Consider the following class definition.Class Student extends String{}What happens when we try to compile…
  21. Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
  22. Give file is a file object, which of the following are legal statements to create a new file.
  23. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  24. Consider the following code snippet: try {int x=0; int y=50/x; System.out.println("Division by zero");…
  25. All methods in an abstract class must be declared abstract.
  26. Which of the following methods can be used to change the size of a size() *resize()
  27. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  28. Which of the following keywords are used to control access to a class member?
  29. Which of the following statements are true?
  30. Which of the following will produce a value of 22 if x=22.9: