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

  • SEARCH
  • Home
  • 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 7024917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:54:21+00:00 2026-05-27T23:54:21+00:00

The value has been inserted from ANOTHER class. I want edit the TextEdit to

  • 0

The value has been inserted from ANOTHER class. I want edit the TextEdit to be this value.

public class Second extends Activity {

    TextView reslt;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.second);
        reslt = (TextView) findViewById(R.id.tvResult);

    }

    public static void insert(int firstResult) {
        // TODO Auto-generated method stub

Someone help please?

I’m trying to make Integer, “firstResult” the TextView, “reslt”.

This is where I inserted the integer from:

public class DataHelper extends Activity{

    public static void insert(String firstFB, String firstRL) {
        // TODO Auto-generated method stub
        Integer a = new Integer(firstFB).intValue();
        Integer b = new Integer(firstRL).intValue();
        int firstResult = a / b;
        Second.insert(firstResult);

I have tried using “reslt.editText(firstResult);” under “public static void insert” but it gave me an error saying I cannot make a static reference to a non-static field result.

Any help will be valued. I am a newbie.

  • 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-27T23:54:22+00:00Added an answer on May 27, 2026 at 11:54 pm

    Think of “static” as defining a single, global reference. However, you may have multiple instances of your “Second” class, each with multiple TextViews. As such, the compiler has no way of knowing which reslt you want to update with the text.

    You can probably get this to compile by changing your TextView reslt;' line tostatic TextView reslt;’ – but this likely won’t be exactly what you want. Instead, you probably should remove static from your insert method, and keep a reference to the instance of your “Second” class that you want to insert to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I check to see if a particular value has already been assigned
I fully understand this question has been asked a lot , but I'm asking
I'm trying to find how a field's value has changed in an ItemUpdat ing
I need to access to a value in a checkbox, the atribute value has
I'm struggling to understand what precisely does it mean when a value has type
I always seem to see if a string (querystring value usually) has a value
sorry ma question went wrong a bit the alis has value like alias =Sri
I know C# has both value and reference types, but how can you do
How can I check if $something['say'] has the value of 'bla' or 'omg' ?
I have a setting stored in database which has a value .jpg|.gif|.png . 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.