Set entire Android Application in Portrait mode only(Portrait Orientation)- Kotlin

On Developing Android application, some application has needed only Portrait mode only (Game: Candy crush) or Portrait Orientation for an entire(full) app or particular on activity. Here we are sharing some common ways to achieve Portrait Mode. How to disable landscape mode for some of the views in my Android app? There are 2 ways to Read More…


Top 3 Android Interview Questions #2 (Android Developer)

If you are an Android experienced developer and want to prepare for Android Interview Questions. There are common Android interview questions that can make confuse you during an interview in top companies. Here we are sharing some common question which can help you crack the android interview. Read it and for more details, you can Read More…


Top 5 Android Interview Questions #1 (Android Developer)

Here are Android Interview Questions for the Experienced Android developer, these questions could make confuse you during an interview in top companies. As we all knew daily android app development growing in the market, so it’s important you have to always update your own android skills. Here we are sharing some common and most asking Read More…


Program for find n’th node from the end of a Linked List

Question: Given a Linked List and a number n, write a program that finds the value at the nth node from the end of the Linked List. Method 1 – Use length of linked list 1.   Calculate the length of Linked List. Follow this tutorial Find Length of a Linked List data 2.   Print Read More…


How to add an Android Studio project to GitHub

If you want to add Android Studio (Android application) project to a GitHub repository using android studio. How can I do that? Here is simple steps : Sign up and create a GitHub account in www.github.com. Download git from https://git-scm.com/downloads and install it in your system. Open the project in android studio and go to File -> Settings -> Version Read More…


Find the middle of a given linked list data structure

Question: In given a Linked List,  find the middle of the list and print the number. Input : -> 4-> 2-> 7-> 9-> 1 Output : 7 Before starting you have to must know about Linked list and how to create it and Inserting node (data) in LinkedList. There is many approach to find middle number Read More…


Constraint Layout Advantage and example in kotlin

Constraint Layout The main advantage of ConstraintLayout is allows you to make large and complex layouts with a flat view hierarchy. No nested view groups like inside RelativeLayout or LinearLayout etc. You can make Responsive UI for android using ConstraintLayout and its more flexible compare to RelativeLayout. Before start if your beginner then follow this tutorial – Build Your Read More…


Determine if a string has all Unique Characters

Question : Determine giving string has all Unique Characters. Without Using additional data structures. Solution : Convert String to Char Array  Sort Char Array Compare char[i ] == char[i+1] if true then String not has all uniques characters. import java.util.Arrays; public class Hello { public static void main(String ar[]) { // given String String str = “Rohit”; Read More…



Conditional (Ternary) Operator example – Basic java

Java ternary operator is the only conditional operator that takes three operands. Java ternary operator is a one-liner replacement for the if-then-else statements. Syntax condition ? expr1 : expr2 Description If condition is true, the operator returns the value of expr1; otherwise, it returns the value of expr2. Code public class Hello { public static void main(String ar[]) { int Read More…