In the previous blog post http://www.jijichiz.com/java-merge-sort-integer-arrays-without-using-pre-defined-functions/, we helped George define a function to merge and sort lists of integers. But in this next post, we are now going to help him merge and sort lists of integers. Same problem, he’s got two unordered lists of integers such as below: [2, 3, 1] [2, 5, 5, […]
Java
Java
Java merge and sort integer arrays without using pre-defined functions
George has a problem. He’s got two unordered integer arrays such as below: {2, 3, 1} {2, 5, 5, 8, 9, 13} Now, he wants to merge these two and sort them in ascending order. He is not allowed to use any sort functions to solve this problem. The result should display: [1, 2, 2, […]
Kotlin Integration with Android Studio
How to Integrate Kotlin with Android Studio Hello guys, I’m back and as usual, I would like to share some programming stuff once again! 😀 At the Google I/O 2017 Google, they announced that Kotlin is now the official programming language of Android. Further information can be found here. Install Kotlin Plugin I am going to […]
Subtraction without using ‘-‘ operator in Java
College Basic Programming Activity Hi guys! I’m back and I’m going to share another programming problem and show the solution. Problem: Write a program which subtracts two integers without using minus (-) operator. Solution: Let’s use this algorithm: a – b = a + -1 * b Then, let’s convert to code: public static void […]
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); […]
Google’s New UI Design Pattern – Navigation Drawer
Today I learned something new in Android Development which is Google’s new UI Design Pattern the Navigation Drawer. For more details go to this site and the sample is here
How to install Eclipse Part 1
Hello everybody, today I will teach you how to install Eclipse, at the time of writing the latest version of Eclipse is Kepler. First we have to download Eclipse. Go to Eclipse site here: http://www.eclipse.org/downloads/ Under Package Solutions, choose Eclipse IDE for Java Developers, 151 MB. Note: If your machine is 32 bit choose 32 bit installer. Stay […]