title: Using object to store data from MYSQL and using a method to print out all the data on TextViews but it does not work
body: <p>I am trying to capture data from mysql and store it into an object named User and I am trying to print all the data from the objects into TextViews using method show account. For some reason the data does not get printed on these text edits and there are no errors. I think I made a logic error or maybe an error in the way i'm using objects.</p>
  <p>this is the java code.</p>
  <pre><code>  package com.example.flybyfinal;
  
  import androidx.appcompat.app.AppCompatActivity;
  
  import android.content.Intent;
  import android.os.AsyncTask;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.TextView;
  
  import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.ResultSet;
  import java.sql.Statement;
  import java.util.HashMap;
  import java.util.Iterator;
  import java.util.Set;
  
  public class accountActivity extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_account);
  
      //calling method for moving to login page
      configureLogout();
      configureFlights();
      
      //calling Async class.
      new Async().execute();
  }
  
  //button for logout.
  private void configureLogout(){
  
      //allocating variable for button widget.
      Button toLoginButton = findViewById(R.id.btnLogout);
  
      //listener for toLogin button.
      toLoginButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              //moving from current activity back to login activity.
             startActivity(new Intent(accountActivity.this, loginActivity.class));
          }
      });
  
  }
  
  //button for going to flights screen
  private void configureFlights(){
      Button toLoginButton = findViewById(R.id.btnFlights);
      toLoginButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              startActivity(new Intent(accountActivity.this, flightActivity.class));
          }
      });
  
  }
  
  //async class for accessing mysql database
  class Async extends AsyncTask&lt;Void, Void, Void&gt; {
  
      //variables made for error message, place holders for extracted mysql data.
      String error = &quot;&quot;;
      String fUsername, fPassword;
      String username, fullname, email, wallet;
  
  
      @Override
      protected Void doInBackground(Void... voids) {
  
          //variables for textviews which will display account details.
          TextView tUsername,tEmail,tFullname, tWallet;
  
          //receive data from login activity, receives logged in accounts username.
          Intent intent = getIntent();
          String accountUsername = intent.getStringExtra(&quot;usernameAcc&quot;);
  
          //allocating variable to textView username.
          tUsername = (TextView) findViewById(R.id.txtUsernameAcc);
  
          //displaying username that has been carried over on textview.
          tUsername.setText(accountUsername);
  
          //try catch for connecting and getting data from mysql database.
          try {
  
              //using jdbc api to connect to mysqlServer, creating sql query to extract data.
              Class.forName(&quot;com.mysql.jdbc.Driver&quot;);
              Connection connection = DriverManager.getConnection(&quot;jdbc:mysql://192.168.1.12:3306/flyby&quot;, &quot;luke&quot;, &quot;luke&quot;);
              Statement statement = connection.createStatement();
              ResultSet resultSet = statement.executeQuery(&quot;SELECT username, fullName, email, eWallet  FROM users&quot;);
  
  
              //looping through extracted mysql database.
              while (resultSet.next()) {
  
                  //sorting extracted data into Strings.
                  String tempUsername = resultSet.getString(&quot;username&quot;);
                  String tempFullname = resultSet.getString(&quot;fullname&quot;);
                  String tempEmail = resultSet.getString(&quot;email&quot;);
                  Double tempWallet = resultSet.getDouble(&quot;wallet&quot;);
  
                  //if statement to check if data from database is the same as the logged in account.
                  if (tempUsername.equals(accountUsername)) {
  
                      //creating user object with newly extracted data.
                      User tempUser =  new User(tempUsername, tempFullname, tempEmail, tempWallet);
  
                      //call show account method which prints all of the data into textViews.
                      tempUser.showAccount();
                 }
              }
  
              //record error into a string.
          } catch (Exception e) {
              error = e.toString();
          }
          return null;
      }
  
      //class user for storing mysql data.
      public class User {
  
          //creating variables for stroring information of the class user.
          private String username, fullname, email, string;
          private Double wallet;
  
          //creator method for class user.
          public User(String username, String fullname, String email, Double wallet) {
              this.username = username;
              this.fullname = fullname;
              this.email = email;
              this.wallet = wallet;
          }
  
          //getters for class user.
          public String getUsername() {
              return username;
          }
  
          public String getFullname() {
              return fullname;
          }
  
          public String getEmail() {
              return email;
          }
  
          public Double getWallet() {
              return wallet;
          }
  
          //setters for class user.
          public void setUsername(String username) {
              this.username = username;
          }
  
          public void setFullname(String fullname) {
              this.fullname = fullname;
          }
  
          public void setEmail(String email) {
              this.email = email;
          }
  
          public void setWallet(Double wallet) {
              this.wallet = wallet;
          }
  
          //public method showAccount for printing all account details too textviews.
          public void showAccount() {
  
              //creating variables for textViews.
              TextView tUsername, tFullname, tEmail, tWallet;
              tUsername = (TextView) findViewById(R.id.txtUsernameAcc);
              tFullname = (TextView) findViewById(R.id.txtFullnameAcc);
              tEmail = (TextView) findViewById(R.id.txtEmailAcc);
              tWallet = (TextView) findViewById(R.id.txtBalanceAcc);
              //converting double to string.
              getWallet().toString(Double.parseDouble(string));
  
              //printing data from database to textviews.
              tUsername.setText(username);
              tFullname.setText(fullname);
              tEmail.setText(email);
              tWallet.setText(string);
          }
          }
      }
  }
  </code></pre>
  <p>all of the things work except for the printing of the data, which makes me believe it is a problem with how I handle the data before I enter it into the objects or a problem with how I use the objects themselves.</p>
  <p>I have added alot of comments to make the reading of code easier, if any additional resources is required let me know and ill update the question.</p>