Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.location.Address;

public class Main {
    public static String extractAddressLines(Address address) {
        String resultAddress = null;
        for (int i = 0, tam = address.getMaxAddressLineIndex(); i < tam; i++) {
            resultAddress += address.getAddressLine(i);
            resultAddress += i < tam - 1 ? ", " : "";
        }

        return resultAddress;
    }
}