Home

Consider the following class definition.
Class Student extends String
{
}
What happens when we try to compile this class?

A. Will not compile because class body is not defined

B. Will not compile because class is not declared public

C. Will compile successfully.

D. Will not compile because String is abstract

You can do it
  1. Which of the following statements are true?
  2. What is java -g used for?
  3. Which of the following methods can be used to change the size of a size() *resize()
  4. Consider the following class definition.Class Student extends String{}What happens when we try to compile…
  5. Every method of a final in class is implicitly final.
  6. Frames and applets cannot be used together in the same program.
  7. Which exception is thrown by the read() method of InputStream class?
  8. Which key word can protect a class in package from accessibility by the classes outside the package?
  9. JSP files creates ________________
  10. To delete a file, we can use an instance of class file.
  11. It is an error to catch the same type of exception in two different catch blocks associated with a particular…
  12. The methods wait() and noify() are defined in
  13. When we implement the Runnable interface, we must define the method
  14. The default case is always required in the switch selection structure.
  15. With javadoc, which of the following denotes a javadoc comment?
  16. An individual array element that is passed to a method and modified in that method will contain the…
  17. It is perfectly legal to refer to any instance variable inside of a static method.
  18. JdbcOdbcDriver is an object of Object class
  19. An EJB is a server-side component that encapsulates the business logic of an application
  20. In a single Servlet class we can use____________
  21. All methods in an abstract class must be declared abstract.
  22. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  23. A final class may not have any abstract method.
  24. Which of the following control expressions are valid for an if statement?
  25. We can over load methods with differences only in their return type.
  26. Which of the following are not keywords?
  27. Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
  28. The programmer must explicitly create the system .in and system .out objects.
  29. A catch can have comma-separated multiple arguments.
  30. Which of the following methods can be used to draw the outline of a square?