In your main
method, you can call your methods by using:
public static void main(String[] args)
{
//-- Your original code up above
printArray(testArray1); //For the array of ints
printArray(testArray2); //For the array of doubles
}
More Related Contents:
- How to construct a loop that produces a temp conversion chart
- Whats Happening in this for loop? [closed]
- Code after if block inside a for loop doesn’t work
- How do i print this using For nested loop?
- I keep getting java.lang.ArrayIndexOutOfBoundsException: 5! How do I fix this? [closed]
- Simple way to use looping in java [closed]
- Even Factorial Method in Java. I have tried everything and can’t figure it out
- Lost on the “for” Loop
- Java 8 Iterable.forEach() vs foreach loop
- How does a for loop work, specifically for(;;)?
- Is there a way to access an iteration-counter in Java’s for-each loop?
- ConcurrentModificationException when adding inside a foreach loop in ArrayList [duplicate]
- Java for loop syntax: “for (T obj : objects)”
- How to efficiently remove all null elements from a ArrayList or String Array?
- How to get a index value from foreach loop in jstl
- Initializing an array in Java using the ‘advanced’ for each loop [duplicate]
- Iterator vs for
- Is there any way to do n-level nested loops in Java?
- Java for loop vs. while loop. Performance difference?
- Java 8 forEach with index [duplicate]
- Null check in an enhanced for loop
- What does the colon (:) operator do?
- Find files in a folder using Java
- Looping through the elements in an array backwards [duplicate]
- How to optimize for-comprehensions and loops in Scala?
- Loop diagonally through two dimensional array
- Java for-loop optimization
- Better way to find index of item in ArrayList?
- Java: For-Each loop and references [duplicate]
- Iterate with for loop or while loop?