A

Admin • 828.03K Points
Coach

Q. What is the output of the following program?

Code:
class A{
public static void main(String args[]){
byte b;
int i = 258;
double d = 325.59;

b = (byte) i;
System.out.print(b);

i = (int) d;
System.out.print(i);

b = (byte) d;
System.out.print(b);
}
}
  • (A) 258 325 325
  • (B) 258 326 326
  • (C) 2 325 69
  • (D) Error
  • Correct Answer - Option(C)
  • Views: 14
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.