English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

how can you write one java method that prints out the contents of any type of array with out knowing what type of array it is? for example, it could be an int[], an object[], a boolean[] and so on. What parameter do you give the method?

2007-12-11 04:37:05 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

1 answers

Here's an example of a generic print array method:

http://www.deitel.com/articles/java_tutorials/20050909/MotivationGenericMethods.html

2007-12-11 04:42:14 · answer #1 · answered by daa 7 · 0 0

fedest.com, questions and answers