A

Admin • 828.03K Points
Coach

Q. Which of the following is the correct way to declare a byte variable named myByte and initialize it to 5 in Java?

  • (A) byte myByte = 5
  • (B) byte myByte = "5"
  • (C) byte myByte = '5'
  • (D) byte myByte = 5.0
  • Correct Answer - Option(A)
  • Views: 13
  • Filed under category Java
  • Hashtags:

Explanation by: Admin
The correct answer is Option A: byte myByte = 5.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.