Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
13
Task/Variable-size-Get/Java/variable-size-get.java
Normal file
13
Task/Variable-size-Get/Java/variable-size-get.java
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
public final class VariableSize {
|
||||
|
||||
public static void main(String[] aArgs) {
|
||||
System.out.println("A Byte variable occupies: " + Byte.SIZE / 8 + " byte");
|
||||
System.out.println("A Char variable occupies: " + Character.SIZE / 8 + " bytes");
|
||||
System.out.println("A Short variable occupies: " + Short.SIZE / 8 + " bytes");
|
||||
System.out.println("A Float variable occupies: " + Float.SIZE / 8 + " bytes");
|
||||
System.out.println("An Integer variable occupies: " + Integer.SIZE / 8 + " bytes");
|
||||
System.out.println("A Double variable occupies: " + Double.SIZE / 8 + " bytes");
|
||||
System.out.println("A Long variable occupies: " + Long.SIZE / 8 + " bytes");
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue