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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:07:06+00:00 2026-06-04T15:07:06+00:00

How to display an integer int a; ( present in activity A1) in another

  • 0

How to display an integer int a; ( present in activity A1) in another activity A2.
And By display i mean, to print it in the UI when A2 is accessed.

Plz tell what to write in the java file and also in XML file.
ThnX in advance.

  • 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-04T15:07:08+00:00Added an answer on June 4, 2026 at 3:07 pm

    In Activity1 class

        int a=2;
        Intent act2=new Intent(this,Activity2.class);
            act2.putExtra("A",a);
            startActivity(act2);
    

    In Activity2 class

        Intent i = getIntent();
        Bundle extras = getIntent().getExtras(); 
        int a = extras.getInt("A");
        tv.setText(a);//considering textView id is tv..
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

does Display:none or jquery Hide function speed up my website, i mean i'm developing
Is it possible to display a view from another controller? Say for example I
Can someone please tell me how can I easily display every record from sqllite
How do I use the ToString method on an integer to display a 2-char
package com.em.progressb; public class progressb extends Activity implements OnClickListener { ProgressDialog dialog; int increment;
I had to do a Java program that said: Write a program in java
I'm getting in an int with a 6 digit value. I want to display
HI, I want to display 20 random images at a time over Activity screen
In my activity, I download several images and then display them by adding each
How do you insert another column, data/timestamp in a database and display it in

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.