Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6556573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:57:43+00:00 2026-05-25T12:57:43+00:00

can you return an array? or an array of objects? or return an object?

  • 0

can you return an array? or an array of objects? or return an object? is that really possible? or is that possible? can anyone give me examples? and also can anyone provied me any good links when it comes to good programming practice? OOP specifically since I want to be a good java programmer also can you return user defined classes? like objects with setters and getters? and arrays? and arrays of objects?

double Amounts ={1,2,3,4,5,6,7} 
for(int i = 0;i<Amounts.length;i++) { 
    Briefcase[i] cases= new Briefcase[]; 
    double x = Amounts[i];
    Briefcase[i].setValue(x); 
} 

public Briefcase[] get(){ 
    return Briefcase[]; 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:57:44+00:00Added an answer on May 25, 2026 at 12:57 pm

    Yes, in many different ways. Not exactly sure what you are asking, so here are a few examples.

    public Object[] getArray() { }
    
    public MyObject[] getArray() { }
    
    public List<MyObject> getArray() { }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a method that can return either a single object or a collection
How can I return an response (lets say an array) to the client with
How can i return my output in ArrayCollection? values = array(); while($row = mysql_fetch_array($result))
I know that I can return the index of a particular character of a
Is there any query which can return me the number of revisions made to
I made an object that actually represents an array of 8 booleans stored in
I need to return an array of initialized objects from VB6 into C# using
In my framework, I have a method that returns an array with objects. It
How can return a subset of a FormCollection with key/values in tact for those
How can return a variable from a thead (I have the threads handle too).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.