create python method code example
Example 1: create method setsupportactionbar
import android.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.support.v7.widget.Toolbar;
public class rutaActivity extends AppCompactActivity {
private Toolbar toolbar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ruta);
getSupportActionBar().hide();
toolbar = (Toolbar) findViewById(R.id.app_bar);
setSupportActionBar(toolbar);
Example 2: how to create an abstract method in java
abstract class Scratch{
abstract public void hello();
abstract String randNum();
}
interface Other{
public void bye();
String randDouble();
}