QuestionQ51

Working with Java Data Types

Which two initialization statements are valid?

Choose two
  • A Boolean available = ג€TRUEג€:
  • B String tmpAuthor = author, author =ג€Mc Donaldג€;
  • C Double price = 200D;
  • D Integer pages = 20;
Explanation

200D is a double literal that can be boxed into a Double, and 20 is an int literal that can be boxed into an Integer.

Community Discussion

No comments yet. Be the first to start the discussion!