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. Consider the following class definition.Class Student extends String{}What happens when we try to compile…
  2. When we invoke repaint () for a Component, the AWT invokes the method:
  3. Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
  4. A Java monitor must either extend thread class or implement Runnable interface.
  5. The use of protected keyword to a member in a class will restrict its visibility as follows:
  6. Which of the following methods belong to the String class?
  7. executeUpdate automatically updates data because___________
  8. forName() is a static factory method
  9. A panel can not be added to another panel.
  10. It is an error to catch the same type of exception in two different catch blocks associated with a particular…
  11. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  12. Frames and applets cannot be used together in the same program.
  13. To delete a file, we can use an instance of class file.
  14. Every method of a final in class is implicitly final.
  15. Which of the following are not keywords?
  16. The methods wait() and noify() are defined in
  17. All the bitwise operators have the same level of precedence in Java.
  18. Which of the following are the wrapper classes?
  19. It is perfectly legal to refer to any instance variable inside of a static method.
  20. Which of the following command lines options generates documentation for all classes and methods?
  21. Which of the following will produce a value of 10 if x = 9.7?
  22. A JSP file can be stored_________________
  23. When we implement an interface method, it should be declared as public.
  24. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  25. Consider the following class definitions: class maths { student student1; } class student { String name;…
  26. A final class may not have any abstract method.
  27. The concept of multiple inheritance is implemented in Java by
  28. Which exception is thrown by the read() method of InputStream class?
  29. With javadoc, which of the following denotes a javadoc comment?
  30. Java always provides a default constructor to a class.