Guest User

Untitled

a guest
Aug 25th, 2020
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. import androidx.appcompat.app.AppCompatActivity;
  2.  
  3. import android.os.Bundle;
  4. import android.view.View;
  5. import android.widget.EditText;
  6. import android.widget.TextView;
  7.  
  8. public class MainActivity extends AppCompatActivity {
  9.  
  10.     TextView output;
  11.     EditText answer;
  12.  
  13.     String ans = "";
  14.  
  15.     @Override
  16.     protected void onCreate(Bundle savedInstanceState) {
  17.         super.onCreate(savedInstanceState);
  18.         setContentView(R.layout.activity_main);
  19.  
  20.         output = (TextView) findViewById(R.id.textView);
  21.         String s = "123";
  22.         int d = (int) Integer.parseInt(s);
  23.         output.setText(d);
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment