Appium Android Multiple Test case, How does it work?

I am trying to Appium to automate a test case on my app.
I managed to run a simple script, but I do NOT understand the logic of of the multiple testcases running process like android life-cycle.
What is the cycle for a testcase?
Because When I run the code below it does not run in order as of, firstTest, secondTest, thirdTest…
How do we tell the testCase what to run first and in what order ? thanks

public class LoginTest {

AndroidDriver driver;

public void setUp() throws MalformedURLException{
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability("device", "Android");
    capabilities.setCapability(CapabilityType.BROWSER_NAME, ""); //Name of mobile web browser to automate. Should be an empty string if automating an app instead.
    capabilities.setCapability(CapabilityType.VERSION, "5.0.2");
    capabilities.setCapability(CapabilityType.PLATFORM, "Android");
    capabilities.setCapability("app-package", "com.myapp"); //Replace with your app's package
    capabilities.setCapability("app-activity", ".myapp"); //Replace with app's Activity
    driver = new RemoteWebDriver(new URL(""), capabilities);

public void firstTest() throws InterruptedException

	List<WebElement> textFieldsList = driver.findElements(By.className("android.widget.EditText")); 
	int size = textFieldsList.size();
	textFieldsList.get(0).sendKeys("[email protected]");

	WebElement btnLogin=driver.findElement("Login"));
	String login = btnLogin.getText();

public void secondTest() throws InterruptedException {
	WebElement btnHome=driver.findElement("Home"));
	String login_1 = btnHome.getText();
public void thirdTest() throws InterruptedException {
	WebElement btnSecond=driver.findElement("Second"));
	String login_2 = btnSecond.getText();

Thank you

Is this a TestNg question or JUnit? Either way you may want to look at the documentation of the tool you are using, I think in TestNg you can set a priority on each test or a dependency to do what you want. Not sure about JUnit.

If this is TestNG, you can use the “dependsOnMethods” option for @Test annotations to specify a dependency between test methods in the same class.

Why does the set of instructions have to be in separate methods? If whatever happens in the second test method depend on what occurs in the first test method, why not combine the two methods into one method?