Setting Up Cordova App Hi there buddy! This is the continuation of my previous post Apache Cordova Blog Listing App Important Note This tutorial assumes that you already have installed Cordova on your machine! 🙂 If not, then I encourage you to visit this site UPDATE: This is the latest site Let’s create the app […]
Month: September 2014
Android SwipeRefreshLayout
The latest update of android support library came out with an interesting new layout: SwipeRefreshLayout. This layout implements the pull-down-to-refresh pattern. In this tutorial, I will show you how to create a SwipeRefreshLayout with a ListView 🙂 Important Note: Support library project must be imported to our workspace and added to our main project as […]
Java Factorial Code
The factorial function (symbol: !) means to multiply a series of descending natural numbers. Examples: 4! = 4 × 3 × 2 × 1 = 24 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5040 import java.util.Scanner; public class Factorial { public static void main(String[] args) { […]
Java Print 1000 Hello World Without Loop
One of the Java questions I faced is to create a program which prints 1000 Hello World without using loop. So how do we solve this? The solution is to use recursion! public class HelloWorld { public static void main(String[] args) { printThousandHelloWorld(1); } private static void printThousandHelloWorld(int n) { if(n < 1000) { printThousandHelloWorld(n+1); […]