| 1 | public class AllInOne { |
| 2 | |
| 3 | public static void main(String[] args) { |
| 4 | } |
| 5 | |
| 6 | int arrayAccess(int[][] a) { |
| 7 | return a[0][0]; |
| 8 | } |
| 9 | |
| 10 | void newArray() { |
| 11 | int[][] a1 = new int[10][]; |
| 12 | int[][][] a2 = new int[5][][]; |
| 13 | int[][][] a3 = new int[6][66][]; |
| 14 | int c[] = {2, 8}; |
| 15 | |
| 16 | boolean[][] my_array = { |
| 17 | {true, false, true}, |
| 18 | {}, |
| 19 | {false, false, true} |
| 20 | }; |
| 21 | } |
| 22 | |
| 23 | void assign(String s) { |
| 24 | String s2 = s; |
| 25 | int x = 10; |
| 26 | int y = x; |
| 27 | } |
| 28 | |
| 29 | void binary(int x, int y, double z) { |
| 30 | int a = x + y; |
| 31 | int b = 1 - x; |
| 32 | double d = 2.0 / 3.3; |
| 33 | long l = 100 >> x; |
| 34 | long ll = 100 >>> x; |
| 35 | } |
| 36 | |
| 37 | void binaryMixedType(byte b, short s, boolean bb, char c, int i, |
| 38 | float f, long l) { |
| 39 | int[] a = new int[10]; |
| 40 | // arithmetic |
| 41 | a[0] = b + i; |
| 42 | // bitwise |
| 43 | a[0] = b & i; |
| 44 | // compare |
| 45 | |
| 46 | // condition |
| 47 | if (b > s) { |
| 48 | a[0] = b; |
| 49 | } |
| 50 | // shift |
| 51 | a[0] = s >> s; |
| 52 | l = l >> s; |
| 53 | a[0] = (int) l; |
| 54 | } |
| 55 | |
| 56 | void unary(int a[], int x) { |
| 57 | if (a.length != 1) { |
| 58 | a[1] = 10; |
| 59 | } |
| 60 | a[0] = -x; |
nothing calls this directly
no outgoing calls
no test coverage detected