veltaandrg / JavaExercises

0 stars 0 forks source link

Primitive types and values #1

Open RodionGork opened 9 years ago

RodionGork commented 9 years ago

Try to compile the following variables declarations with initializers.

    int a = 50;
    int b = 500000000;
    long c = 50000000;
    long d = 50000000000;
    byte e = 50;
    byte f = -50;
    byte g = 500;
    char h = 500;
    char i = -500;
    double p = 3.14;
    double o = 3.14e100;
    float q = 3.14;
    float r = 3.14e100;

Explain what errors there occur. Fix these errors which could be fixed and comment out those which could not.

cospirV commented 9 years ago

http://ideone.com/rIAqLb