Home
You may like this!
36.
Which of the following statements can you use to catch integer overflow and underflow errors?
  • A.
    checked
  • B.
    overflow
  • C.
    watch
  • D.
    try
  • Answer & Explanation
  • Report
Answer : [C]
Explanation :
Report
Name Email  
37.
Which of the following techniques should you use to watch for floating point operations that cause overflow or underflow?
  • A.
    Use a checked block.
  • B.
    Use a try-catch block.
  • C.
    Check the result for the value Infinity or NegativeInfinity.
  • D.
    Check the result for Error.
  • Answer & Explanation
  • Report
Answer : [B]
Explanation :
Report
Name Email  
38.
Which the following statements about the base keyword is false?
  • A.
    A constructor can use at most one base statement.
  • B.
    A constructor cannot use both a base statement and a this statement.
  • C.
    The base keyword lets a constructor invoke a different constructor in the same class.
  • D.
    If a constructor uses a base statement, its code is executed after the invoked constructor is executed.
  • Answer & Explanation
  • Report
Answer : [C]
Explanation :
Report
Name Email  
39.
Which the following statements about the this keyword is false?
  • A.
    A constructor can use at most one this statement
  • B.
    A constructor can use a this statement and a base statement if the base statement comes first.
  • C.
    The this keyword lets a constructor invoke a different constructor in the same class.
  • D.
    If a constructor uses a this statement, its code is executed after the invoked constructor is executed.
  • Answer & Explanation
  • Report
Answer : [D]
Explanation :
Report
Name Email  
40.
Suppose you have defined the House and Boat classes and you want to make a HouseBoat class that inherits from both House and Boat. Which of the following approaches would not work?
  • A.
    Make HouseBoat inherit from both House and Boat.
  • B.
    Make HouseBoat inherit from House and implement an IBoat interface
  • C.
    Make HouseBoat inherit from Boat and implement an IHouse interface.
  • D.
    Make HouseBoat implement both IHouse and IBoat interfaces.
  • Answer & Explanation
  • Report
Answer : [B]
Explanation :
Report
Name Email