4 Ways to Get Current Date in Android

In this tutorial I will show you 4 different ways to get current date in android. For doing this we will use Calendar, Date, SimpleDateFormate and System class. How to Get Current Date in Android? Method 1: In this method we will use Calendar and SimpleDateFormate class.

  Method 2: We can use Calendar… Read More »

Android Date Picker Example

In this tutorial you will get android date picker example. DatePickerDialog is used to show a dialog to pick a date. To show a DatePickerDialog call showDialog() with unique DatePickerDialog id. onCreateDialog() method is automatically called on calling showDialog() method. Register OnDateSetListener with DatePickerDialog and override onDateSet() method. onDateSet() contains the picked date. I am setting… Read More »

Android Round Button Example

In this tutorial you will learn how to create a round button in android. Shape drawable resource is used to define shape of a view. Below I have shared an example to to make a circle button. Android Round Button Example Create a xml file inside res/drawable folder. round_button.xml

  shape: Defines shape of view.… Read More »

Diamond Problem in Inheritance

Diamond problem occurs when we use multiple inheritance in programming languages like C++ or Java. Let’s understand this with one example. Diamond Problem in Inheritance

Suppose there are four classes A, B, C and D. Class B and C inherit class A. Now class B and C contains one copy of all the functions… Read More »

Android Push Notification Using Firebase Cloud Messaging (FCM)

In this tutorial you will learn to implement android push notification using firebase cloud messaging (FCM). Firebase is a real time cross platform database that provides various functionalities like authentication, storage, notification, etc. Firebase is becoming popular among developers due to its simplicity and easy implementation. In earlier days Google Cloud Messaging (GCM) was used… Read More »

Format Specifiers in C

In this article you will get list of format specifiers in C. Format specifier is used to specify the data type while reading or writing. For example if you want to print value of an integer type variable then you have to use %d in printf() function. Take below example.

  As you can… Read More »

0-1 Knapsack Problem in C Using Dynamic Programming

Here you will learn about 0-1 knapsack problem in C. We are given n items with some weights and corresponding values and a knapsack of capacity W. The items should be placed in the knapsack in such a way that the total value is maximum and total weight should be less than knapsack capacity. In… Read More »

Category: DSA

Difference between SQL and PL/SQL

Here you will learn about difference between SQL and PL/SQL. SQL and PL/SQL are two popular database technologies. These two topics are very frequently asked in database interviews. In this article I have shared the key differences between these two technologies. Also Read: PL/SQL Interview Questions and Answers Image Source Difference between SQL and PL/SQL S.… Read More »

Producer Consumer Problem in C

Here you will learn about producer consumer problem in C. Producer consumer problem is also known as bounded buffer problem. In this problem we have two processes, producer and consumer, who share a fixed size buffer. Producer work is to produce data or items and put in buffer. Consumer work is to remove data from… Read More »