Skip to content

Instantly share code, notes, and snippets.

View aivydebnath's full-sized avatar
🏠
Working from home

aivydebnath

🏠
Working from home
View GitHub Profile
@udacityandroid
udacityandroid / MainActivity.java
Last active November 22, 2022 21:34
Android for Beginners : Cookies Starting Code
package com.example.android.cookies;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
public class MainActivity extends AppCompatActivity {
@Override
@udacityandroid
udacityandroid / Method 1
Created June 10, 2015 03:50
Android Development for Beginners : Define a Method
/**
* Get the email account name.
*
* @return the name of the account.
*/
private String getAccountName() {
return "android@gmail.com";
return "droid@gmail.com";
}
@udacityandroid
udacityandroid / Calculate price method
Created June 9, 2015 23:49
Add to MainActivity.java
/**
* Calculates the price of the order.
*
* @param quantity is the number of cups of coffee ordered
*/
private void calculatePrice(int quantity) {
int price = quantity * 5;
}