Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
query
sid dutta
Greenhorn
Posts: 6
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
can we return arrays of any type through a function
if yes then please give an example
Campbell Ritchie
Marshal
Posts: 79178
377
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Yes. You can create an array of any type and return it, or pass it as a parameter.
Can't think of a return type offhand, but there is a very common parameter . .
public static void main(
String
[] args)
!
sid dutta
Greenhorn
Posts: 6
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i want to know that can there be a return type of any type of array
Arpit Sharma
Greenhorn
Posts: 8
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
yes you can return Object [] for any type
example is as
public Object [] abc(){
return new String []{"1","2"};
}
SCJP 1.5
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Widening Reference Conversation
Resultset from Action class to JSP ?
how to compare values in an array if they are the same or not
How is priority determined?-Collection Doubt
Can arrays in Javascript contain functions
More...