package com.example.myapplication; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends AppCompatActivity { Button butonHesapla; EditText editAy; TextView txtAy; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); butonHesapla=findViewById(R.id.btnHesapla); editAy=findViewById(R.id.edtAy); txtAy=findViewById(R.id.txtAy); butonHesapla.setOnClickListener(new View.OnClickListener()) { @Override public void onClick(View view) { int sayiAy=Integer.porseInt(editAy.getText().toString()); String ay=""; switch (sayiAy) { case 1: ay="Ocak"; break; case 2: ay="Şubat"; break; case 3: ay="Mart"; } } } } }