AndroidStudioSample

package com.example.kunihiro.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Person person=new Person();
person.setage(25);
System.out.println(person.getage());
}
}
class Person {
String name;
int age;
public void setname(String string) {
name = string;
}
public String getname() {
return name;
}
public void setage(int integer) {
age = integer;
}
public int getage() {
return age;
}
}