adplus-dvertising
frame-decoration

Question

An expression involving byte, int, and literal numbers is promoted to which of these?

a.

int

b.

long

c.

byte

d.

float

Posted under Java Programming

Answer: (a).int

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. An expression involving byte, int, and literal numbers is promoted to which of these?

Similar Questions

Discover Related MCQs

Q. Which of these literals can be contained in float data type variable?

Q. Which data type value is returned by all transcendental math functions?

Q. How to format date from one form to another?

Q. How to convert Date object to String?

Q. How to convert a String to a Date object?

Q. Is SimpleDateFormat thread safe?

Q. How to identify if a timezone is eligible for DayLight Saving?

Q. What is the replacement of joda time library in java 8?

Q. How is Date stored in database?

Q. What does LocalTime represent?

Q. How to get difference between two dates?

Q. How to get UTC time?

Q. Which of these is an incorrect string literal?

Q. Which two cause a compiler error?

1. float[ ] f = new float(3);
2. float f2[ ] = new float[ ];
3. float[ ]f1 = new float[3];
4. float f3[ ] = new float[3];
5. float f5[ ] = {1.0f, 2.0f, 2.0f};

Q. Given a method in a protected class, what access modifier do you use to restrict access to that method to only the other members of the same class?

Q. Which is a valid declaration within an interface?

Q. You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?

Q. Which three form part of correct array declarations?

1. public int a [ ]
2. static int [ ] a
3. public [ ] int a
4. private int a [3]
5. private int [3] a [ ]
6. public final int [ ] a

Q. public class Test { }

What is the prototype of the default constructor?

Q. What is the most restrictive access modifier that will allow members of one class to have access to members of another class in the same package?