Home

Which of the following methods can be used to draw the outline of a square?

A. fillRect()

B. drawLine()

C. drawString()

D. all of the above

You can do it
  1. The modulus operator (%) can be used only with Integer operands.
  2. Declarations can appear anywhere in the body of a Java method.
  3. Submit button always fires doPost(...)
  4. We would like to make a member of a class visible in all subclasses regardless of what package they…
  5. A method declared as static can not access non-static class members.
  6. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  7. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  8. In order to connect to a database through java program we must create _______-
  9. Declaring a method synchronized guarantees that the deadlock cannot occur.
  10. A string object can not be modified after it is created.
  11. Which of the following statements are true?
  12. The concept of multiple inheritance is implemented in Java by
  13. The expression (x == y && a<b) is true If either x == y is true or a<b is true.
  14. All the bitwise operators have the same level of precedence in Java.
  15. When we implement an interface method, it should be declared as public.
  16. A constructor must always invoke its supper class constructor in its first statement.
  17. Which of the following statements are valid array declarations?
  18. The programmer must explicitly create the system .in and system .out objects.
  19. Which of the following methods can be used to change the size of a size() *resize()
  20. When the string objects are compared with ==, the result is true If the strings contain the same values.
  21. For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.
  22. Which of the following are keywords?
  23. executeUpdate automatically updates data because___________
  24. Which key word can protect a class in package from accessibility by the classes outside the package?
  25. Every method of a final in class is implicitly final.
  26. Java always provides a default constructor to a class.
  27. Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
  28. Consider the following class definition.Class Student extends String{}What happens when we try to compile…
  29. Throwing an exception always causes program termination.
  30. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.