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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:07:09+00:00 2026-06-18T08:07:09+00:00

i m trying to parse the data from a link with gets information about

  • 0

i m trying to parse the data from a link with gets information about city and state from an edit text i want to get the data of edit text save it in a string and then use that string in another class. i tried my best by creating an object an calling the function but it don’t work please someone help me

this is the code for getting the text and returing that string to a function.

         public String et(){
    location= et.getText().toString();
    return this.location;
}

and this is the other class where i am using this edittext by saving it in a string

     public void test(){
    Main mm= new Main();
    location1= mm.et();
    }

but it don’t work where i am going wrong i don’t know.i know its silly question but please help me .

  • 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-18T08:07:10+00:00Added an answer on June 18, 2026 at 8:07 am

    Make location as a static String and access it in other class using Class_Name.location;

    class myClass {
    static String location=null;
     public void et(){
        location= et.getText().toString();
          }
    }
    

    //Now consider method et was called and location variable have been initialized to some String

      class aClass {
        public static void main(String args[])
        {
        System.out.println(myClass.location);
        }
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get data from the link from this code and get
I am trying to parse data from the XML below (I shortened the data
I am trying to parse data from commoncrawl.org using hadoop streaming. I set up
I am trying to parse some data from ifconfig output with sed, but I
I'm trying to load and parse json data from an external source into a
I am trying to fetch data from internet, parse it and then show the
I'm trying to parse the output from a tool into a data structure but
I'm using SimpleXML to parse a data file from an external source. I'm trying
I'm trying to parse data from a website and cannot print the data. import
I'm trying to parse data from Archive.org's search functionality. The data looks like this:

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.