It is perfectly legal to refer to any instance variable inside of a static method.

A. True

B. False

You can do it
  1. Declarations can appear anywhere in the body of a Java method.
  2. The methods wait() and noify() are defined in
  3. A catch can have comma-separated multiple arguments.
  4. In the code below, what data types the variable x can have?
  5. Java is fully object oriented programme.
  6. When the string objects are compared with ==, the result is true If the strings contain the same values.
  7. Which of the following keywords are used to control access to a class member?
  8. The name of a Java program file must match the name of the class with the extension Java.
  9. The programmer must explicitly create the system .in and system .out objects.
  10. When we implement an interface method, it should be declared as public.
  11. Which of the following command lines options generates documentation for all classes and methods?
  12. In order to connect to a database through java program we must create _______-
  13. Which of the following control expressions are valid for an if statement?
  14. Java always provides a default constructor to a class.
  15. The import statement is always the first no comment statement in a Java program files.
  16. Which of the following represent legal flow control statements?
  17. We would like to make a member of a class visible in all subclasses regardless of what package they…
  18. The break statement is required in the default case of a switch selection structure.
  19. The expression (x == y && a<b) is true If either x == y is true or a<b is true.
  20. Which of the following statements are valid array declarations?
  21. Which exception is thrown by the read() method of InputStream class?
  22. If m and n are int type variables, what will be the result of the expression'm % n' when m = -14 and…
  23. Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
  24. It is an error to have a method with the same signature in both the super class and its subclass.
  25. It is perfectly legal to assign a subclass object to a supper class reference.
  26. What is java -g used for?
  27. In RMI before running the client program we must start RMI Registry.
  28. Declaring a method synchronized guarantees that the deadlock cannot occur.
  29. Which of the following will produce a value of 22 if x=22.9:
  30. A string object can not be modified after it is created.