Skip to content

Instantly share code, notes, and snippets.

View DoozyDoz's full-sized avatar
😮‍💨
Sleeping..

Doozy DoozyDoz

😮‍💨
Sleeping..
View GitHub Profile

Interview Questions

Kotlin

Q1: What is a primary constructor in Kotlin? ☆☆

Answer: The primary constructor is part of the class header. Unlike Java, you don't need to declare a constructor in the body of the class. Here's an example:

@ArsalRaza
ArsalRaza / VideoUtils.java
Last active January 25, 2024 11:39
Extract Audio from Video, Mute Video, Crop Video from start, Crop Video from end Android MediaMuxer - JAVA
import android.annotation.SuppressLint;
import android.media.MediaCodec;
import android.media.MediaExtractor;
import android.media.MediaFormat;
import android.media.MediaMetadataRetriever;
import android.media.MediaMuxer;
import android.util.Log;
import java.io.IOException;
import java.nio.ByteBuffer;
@jpetitto
jpetitto / gist:f01fa09af58189f335b5
Created April 30, 2015 19:24
Jake Wharton's Tips for Becoming a Better Android Developer
  1. Don't blindly accept that Google's approach to Android development is always the right way. Judge for yourself what the right approach is (often times it is Google's approach) based on your requirements and solution.

  2. Be comfortable with examining the Android source code. It's not magic, there's always an answer. Helps you solve problems that would otherwise show up on Stackoverflow.

  3. Be multi-discipline. Android can be your focus, but develop for other platforms and use other languages.

  4. Master the tools. Make it work for you.

  5. Be resourceful. Know when and why a library is the right choice over writing your own solution.