This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes java.util.array not recognised Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java.util.array not recognised" Watch "java.util.array not recognised" New topic
Author

java.util.array not recognised

apeksha agarwal
Greenhorn

Joined: Oct 28, 2011
Posts: 12
hi everyone..
my problem is that during import of util.array.* in order to use asList function my system is not recognizing util.array as well as asList..
please tell me how to resolve such a problem.

thank you.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60804
    
  65

Spell it correctly.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
apeksha agarwal
Greenhorn

Joined: Oct 28, 2011
Posts: 12
sir even after spelling it correctly its not recognizing asList function.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60804
    
  65

Don't tell us. Show us.
apeksha agarwal
Greenhorn

Joined: Oct 28, 2011
Posts: 12


sir above is my code and the bold line indicates the line in which i am having problem.
below is the process method given in which asList is used.


Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

So your "tagging" class doesn't have an asList() method, and the compiler tells you so. (Correct? Post the actual compiler error message if you don't agree with that.) This has nothing to do with asList() methods that you found in some other class.
apeksha agarwal
Greenhorn

Joined: Oct 28, 2011
Posts: 12
yes sir..
error is "method asList(String[]) is undefined for the type tagging"
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Okay. So did you plan to write your own asList() method for that class? Or did you mean to use the static method from the Arrays class?
apeksha agarwal
Greenhorn

Joined: Oct 28, 2011
Posts: 12
sir, i am planing to use the static method from the from the arrays class..
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38067
    
  22
And what are you trying to import? Are you trying to import a static method? Where it says typeName, it means the full-qualified name of the class/interface.
Please use the Java™ conventions: spaces for indenting, not tabs, capital letters for class names, names do not start with _ (except package names). Since you are new, I have added code tags and you can see how much better your code looks.
What are you calling a destroy() method on?

And welcome to the Ranch
apeksha agarwal
Greenhorn

Joined: Oct 28, 2011
Posts: 12
thanks..

well i am trying to import the util.Arrays.
but still its not recognizing asList..
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Okay. Let's see the import statement you have now, then.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.util.array not recognised
 
Similar Threads
String array to arraylist
Collections - Exception
Why am i getting arrayIndexOutofBound
Adding array to List
Another from collections