Lernen am Samstag
This commit is contained in:
@@ -95,6 +95,23 @@ public class Primitive {
|
||||
// Float F1 = (int)12; Float, Double können keine Ganzzahl-Literale zugewiesen werden
|
||||
Double D1 = (double)12;
|
||||
|
||||
// Float F12 = 11;
|
||||
Float F11 = new Float(11L);
|
||||
System.out.println("F11" + F11);
|
||||
|
||||
float f4 = 4.0f;
|
||||
long l6 = 4L;
|
||||
System.out.println("2323: " + (f4 == l6));
|
||||
|
||||
Short short1 = 127;
|
||||
Short short2 = 127;
|
||||
Short short3 = 128;
|
||||
Short short4 = 128;
|
||||
|
||||
assertTrue(short1 == short2);
|
||||
assertFalse(short3 == short4);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user