Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ArrayManip {
- public static void main(String[] args) {
- int[] firstArray = new int[10];
- createSingleArray(array);
- printArray(array);
- }
- public static void createSingleArray(int array[]) {
- for (int i=0; i<array.length; i++) {
- array[i] = i+1;
- }
- }
- public static void printArray(int array[]) {
- for (int i=0; i<array.length; i++) {
- System.out.println(array[i]);
- }
- }
- }
Add Comment
Please, Sign In to add comment