June 2019 | Programming Guide

Palindrome

A Palindrome is a text, number or sentence which can be read the same phrase or value backwards and forwards. For instance: Anna(forward)    annA (backwards)  We implement our code ignoring the lower and uppercase words because our word has the same meaning. This may be prevented by adding to  palindrom.toLowerCase() to our  String. Source Code: DOWNLOAD

How to write a file in Android

First, we need to define a path. We can’t save files everywhere because of the different permissions. We write our file to the project path. Create Empty Project  Start emulator or your device Go to View ->Tool Windows->Device File Explorer Select directory Data->Data  6.Select your project folder and copy path(right mouse click) My path is /data/data/learn.hq.readwritefiles/textFile.txt Well, this […]

Android Custom ViewList with onItemClickListener

Android Custom ViewList with onItemClickListener If you want to create a custom List you have to implement BaseAdapter (Observable pattern) making modifications with a help of getView() method  . BaseAdapter is a common based class providing an Adapter an implemantation.Generally you use it in Listview and SpinnerAdapter.The most important method is notifyDataSetChanged().The method refresh the modifications of the […]

Quicksort

Quicksort is an efficient sorting algorithm, developed by British computer scientist Tony Hoare in 1959. Algorithm:  find Pivot element (it may be the first, last or random value in array) put elements in order. The elements on the Left side are lesser than the pivot element. The elements on the Right side are greater than the pivot element […]

Java Collections

Collections are a set of data performing administration of all abstract datatypes. ( e.g searching,sorting,inserting,delete).Collections are very helpful by providing useful data structures and reduce programming effort. The disadvantages are casting to correct type of object and compile-time type checking is not possible. Simple List example: Now we want to represent our data as output. I want you […]