Skip to content

Instantly share code, notes, and snippets.

@udacityandroid
udacityandroid / MainActivity.java
Last active Feb 11, 2021
Android for Beginners : Cookies Starting Code
View MainActivity.java
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
@dodyg
dodyg / gist:5823184
Last active Apr 18, 2021
Kotlin Programming Language Cheat Sheet Part 1
View gist:5823184

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@dodyg
dodyg / gist:5616605
Last active Feb 17, 2021
Kotlin Programming Language Cheat Sheet Part 2
View gist:5616605

This is a quick guide to Kotlin programming language. The previous part of this guide is here

#Object Oriented

fun main(args : Array<String>) {
  class local (val x : Int)
  
  val y = local(10)
  println("${y.x}")