Home

Consider the following statements:
int x = 10, y = 15; 
x = ((x < y) ? (y + x) : (y - x);

What will be the value of x after executing these statements?

A. 25

B. 15

C. 5

D. Error can't be executed.

You can do it
  1. An EJB is a server-side component that encapsulates the business logic of an application
  2. Which of the following classes are available in the java.lang package?
  3. Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
  4. A constructor must always invoke its supper class constructor in its first statement.
  5. The check box group class is a subclass of the component class.
  6. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  7. In the code below, what data types the variable x can have?
  8. It is perfectly legal to assign a subclass object to a supper class reference.
  9. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  10. Which of the following statements are valid array declarations?
  11. If m and n are int type variables, what will be the result of the expression'm % n' when m = -14 and…
  12. For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.
  13. The length of a string object 's1' can be obtained using the expression s1.length.
  14. With javadoc, which of the following denotes a javadoc comment?
  15. DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.
  16. The use of protected keyword to a member in a class will restrict its visibility as follows:
  17. Declaring a method synchronized guarantees that the deadlock cannot occur.
  18. In RMI we invoke client method from remote server
  19. Consider the following class definition.Class Student extends String{}What happens when we try to compile…
  20. Which of the following control expressions are valid for an if statement?
  21. We can over load methods with differences only in their return type.
  22. Two methods cannot have the same name in Java.
  23. executeUpdate(------------) returns ___________
  24. All methods in an abstract class must be declared abstract.
  25. The name of a Java program file must match the name of the class with the extension Java.
  26. Which of the following methods belong to the String class?
  27. A final class may not have any abstract method.
  28. Give file is a file object, which of the following are legal statements to create a new file.
  29. Which of the following represent legal flow control statements?
  30. We would like to make a member of a class visible in all subclasses regardless of what package they…