Last active
May 11, 2018 17:22
-
-
Save edenizk/e3aa35e534af918717448c8d08c125f0 to your computer and use it in GitHub Desktop.
prints array list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.deniz.arraylist; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
import org.w3c.dom.Text; | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
TextView txtValue = (TextView) findViewById(R.id.txtValue); | |
TextView txtIndex = (TextView) findViewById(R.id.txtIndex); | |
String oldValue; | |
String oldIndex; | |
int[] intArray = new int[10]; | |
for (int i = 0 ; i < intArray.length ; i++){ | |
oldIndex = txtIndex.getText().toString(); | |
oldValue = txtValue.getText().toString(); | |
txtValue.setText(oldValue + i + "\n"); | |
txtIndex.setText(oldIndex + i + "\n"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment