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 8705883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:28:34+00:00 2026-06-13T03:28:34+00:00

Ok this is a guess a really simple problem which I am having a

  • 0

Ok this is a guess a really simple problem which I am having a black out about…. however it is killing my head.
Here is the source:

import java.util.Arrays;
public class InputValues {  
    public int[] myarrayvar;
    public InputValues(int[] myarraypass) {     
    ---- help here
    }
    public void init() {        
    ---help here
    }
    public int[] getmyarrayvar() {
        return myarrayvar;
    }
    public void setmyarrayvar(int[] myarraypass) {
        this.myarrayvar= mayarraypass;
    }
}

I call the this with

InputValues inputValues = new InputValues(myarraypass);
inputValues.init();

myarraypass is of type int[].

Like I said this should be really easy…. but I can’t get it to work for some reason….

  • 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-06-13T03:28:35+00:00Added an answer on June 13, 2026 at 3:28 am
    1. In case your myarrayvar is public then why would you need a setter and getter. You need them only when your member is inaccessible to the outside world, i.e. it’s marked private.
    2. Nest, you can use the following in your constructor for setting the array,
    public InputValues(int[] myarraypass) { 
    
        this.myarrayvar = new int[myarraypass.length];    
    
        System.arraycopy(myarraypass, 0, this.myarrayvar, 0, myarraypass.length );
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i stuck with a problem which is really important i guess. In a simple
I guess this is fairly simple for you but i cant wrap my head
I guess this is simple, but i couldnot figure it out. i have a
I have a really simple jQuery problem (I guess). But im totally new to
I've found this question , which doesn't really solve my problem but at least
I guess this is a simple question. I need to do something like this:
I guess this is similar to what Facebook does, but...I haven't worked out how
I'm sure this is a really simple question. The following code shows what I'm
Ok i guess this is a bit of a general question really as opposed
This is really weird problem. I just installed Node.JS on my system (Fedora). I

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.