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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:44:58+00:00 2026-05-27T08:44:58+00:00

I am currently developing an android project using eclipse JAVA and I had just

  • 0

I am currently developing an android project using eclipse JAVA and I had just written the method below,

ArrayList<string> question, modelAnswer, correctAnswer, answer1, answer2, answer3, picture, questionNo;

public void QuestionGenerator(String[][] array, int number ){
    if (number > array.length){
        number = array.length;
    }
    Collections.shuffle(Arrays.asList(array));
    for (int i=0; i<number; i++){
        question.add(array[i][0]);
        modelAnswer.add(array[i][1]);
        answer1.add(array[i][1]);
        answer2.add(array[i][2]);
        answer3.add(array[i][3]);
        picture.add(array[i][4]);
        questionNo.add(array[i][5]);
    }
}

But I am having the error of “The method add(R.string) in the type ArrayList is not applicable for the arguments (String)” coming up for the add function for those array lists. Could anyone suggest me why I got this? Is the method can’t handle with 2d array or why?

Thanks

  • 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-27T08:44:59+00:00Added an answer on May 27, 2026 at 8:44 am

    Try to use the uppercase String 🙂

    ArrayList<String> question, modelAnswer, correctAnswer, answer1, answer2, answer3, picture, questionNo;
    

    And initialize the ArrayLists:

    ArrayList<String> question = new ArrayList<String>();
    (...)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing an Android application that fetches images using http requests. It would
I'm currently developing an Android app, which loads events from a server using JSON
I'm new to developing apps in Android. We are currently creating a robot using
I am currently developing an Android app that is using a remote MySQL database
I have been developing a project in eclipse for an android app. An error
I'm currently developing a small test project with Android and I get the infamous
Currently i'm developing an Android project on Android Platform 2.3.3, API Level 10 .
I'm developing an Android project which currently has 4 packages: com.myapp.app.activities com.myapp.app.db com.myapp.app.ws com.myapp.app.utils
So I am currently developing an Android game for a school project, and there
I'm currently developing a small OpenGL game for the Android platform and I wonder

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.