Given the code
String s = new String("abc");
Which of the following calls are valid?

A. s.toUpperCase()

B. s.append("xyz")

C. s.setCharAt(1<'A')

D. all of the above

You can do it
  1. It is perfectly legal to refer to any instance variable inside of a static method.
  2. Submit button always fires doPost(...)
  3. When we implement an interface method, it should be declared as public.
  4. Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
  5. A thread can make second thread ineligible for execution by calling the suspend (-) method on second…
  6. Which of the following methods can be used to draw the outline of a square?
  7. The expression (x == y && a<b) is true If either x == y is true or a<b is true.
  8. Which of the following represent legal flow control statements?
  9. Java is fully object oriented programme.
  10. We can over load methods with differences only in their return type.
  11. If you want to assign a value of 99 to the variable year, then which of the following lines can be used…
  12. DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.
  13. A method declared as static can not access non-static class members.
  14. Which of the following methods can be used to remove a component from the display?
  15. The import statement is always the first no comment statement in a Java program files.
  16. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  17. executeUpdate(------------) returns ___________
  18. When we invoke repaint () for a Component, the AWT invokes the method:
  19. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  20. A string object can not be modified after it is created.
  21. The use of protected keyword to a member in a class will restrict its visibility as follows:
  22. Servlet can have ___________
  23. All the bitwise operators have the same level of precedence in Java.
  24. A panel can not be added to another panel.
  25. Which key word can protect a class in package from accessibility by the classes outside the package?
  26. Which of the following will produce a value of 10 if x = 9.7?
  27. A constructor must always invoke its supper class constructor in its first statement.
  28. Consider the following class definitions: class maths { student student1; } class student { String name;…
  29. In evaluating a logical expression of type 'Boolean expression 1&& Boolean expression 2', both the Boolean…
  30. The length of a string object 's1' can be obtained using the expression s1.length.