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. Consider the following code snippet: try {int x=0; int y=50/x; System.out.println("Division by zero");…
  2. DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.
  3. A variable declared inside the for loop control can not be referenced out side the loop.
  4. The concept of multiple inheritance is implemented in Java by
  5. It is an error to catch the same type of exception in two different catch blocks associated with a particular…
  6. Which of the following represent legal flow control statements?
  7. Connection, Statement are interfaces and ResultSet is a class.
  8. What is wrong in the following class definitions? abstract class print { abstract show();} class…
  9. Any class may be inherited by another class in the same package.
  10. Which of the following are not keywords?
  11. To delete a file, we can use an instance of class file.
  12. All methods in an abstract class must be declared abstract.
  13. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  14. The modulus operator (%) can be used only with Integer operands.
  15. A Java monitor must either extend thread class or implement Runnable interface.
  16. The keywords reserved but not used in the initial version of Java re:
  17. Servlet has ___________
  18. EJBs can be of the following type(s)None of the above
  19. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  20. A method declared as static can not access non-static class members.
  21. The setBackground() method is part of the class
  22. A panel can not be added to another panel.
  23. In evaluating a logical expression of type 'Boolean expression 1&& Boolean expression 2', both the Boolean…
  24. The length of a string object 's1' can be obtained using the expression s1.length.
  25. It is an error to have a method with the same signature in both the super class and its subclass.
  26. The use of protected keyword to a member in a class will restrict its visibility as follows:
  27. Objects are passed to a method by use of call-by-reference.
  28. When we implement the Runnable interface, we must define the method
  29. The import statement is always the first no comment statement in a Java program files.
  30. The expression (x == y && a<b) is true If either x == y is true or a<b is true.