Home

In the code below, what data types the variable x can have?

A. byte b1 = 5;

B. byte b2 = 10;

C. x = b1 * b2;

D. int short

You can do it
  1. When the string objects are compared with ==, the result is true If the strings contain the same values.
  2. The length of a string object 's1' can be obtained using the expression s1.length.
  3. Consider the following class definitions: class maths { student student1; } class student { String name;…
  4. The import statement is always the first no comment statement in a Java program files.
  5. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  6. Which of the following represent legal flow control statements?
  7. Connection, Statement are interfaces and ResultSet is a class.
  8. Servlet can have ___________
  9. A variable declared inside the for loop control can not be referenced out side the loop.
  10. Objects are passed to a method by use of call-by-reference.
  11. JSP files creates ________________
  12. Consider the following class definition.Class Student extends String{}What happens when we try to compile…
  13. What is wrong in the following class definitions? abstract class print { abstract show();} class…
  14. A static class method can be invoked by simply using the name of the method alone.
  15. Which of the following command lines options generates documentation for all classes and methods?
  16. Declarations can appear anywhere in the body of a Java method.
  17. class.forName(...) creates an instance of java ODBC driver
  18. It is an error to have a method with the same signature in both the super class and its subclass.
  19. A constructor must always invoke its supper class constructor in its first statement.
  20. forName() is a static factory method
  21. Which of the following are keywords?
  22. For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.
  23. Which of the following keywords are used to control access to a class member?
  24. Two methods cannot have the same name in Java.
  25. Java always provides a default constructor to a class.
  26. It is an error to catch the same type of exception in two different catch blocks associated with a particular…
  27. All methods in an abstract class must be declared abstract.
  28. Give file is a file object, which of the following are legal statements to create a new file.
  29. The break statement is required in the default case of a switch selection structure.
  30. In RMI before running the client program we must start RMI Registry.