Whole or decimal
You've seen several different primitive types for numerical values.
Can you choose the correct one?
Diese Übung ist Teil des Kurses
Introduction to Java
Anleitung zur Übung
- Choose the correct primitive type for the
dressPricevariable. - Choose the correct primitive type for the
shoePricevariable.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
class WholeOrDecimal {
public static void main(String[] args) {
byte dressSize = 8;
float shoeSize = 11.5F;
// Choose the correct primitive type
____ dressPrice = 55;
____ shoePrice = 49.9;
}
}