Monday, 8 September 2014

Program to Reverse a Number in Java



Reverse a Number : Since every digit when divided by 10 gives the remainder equal to the unit place digit of that number and we need to set that unit place digit of number to the last place digit of the number than again set the 100’s digit of that number to the second last place of the given number and so on. To get the remainder of a number, a modulus…
Read more

Auto Complete Text View Tutorial in Android



Auto Complete Text View : Download the whole project! In Auto Complete Text View whenever we start writing a text in the Edit View than it will automatically show the available options related to that text as you stored in an array or in a database. You can see the example shown in the following screenshot : In this example, I am storing the available…
Read more

Sunday, 7 September 2014

Matrix Multiplication Program in Java



Matrix Multiplication Program : To multiply two matrices we need to first check whether the two matrices can be multiplied or not. For that compare the first matrix column with the rows of second matrix, if they are equal than only the two matrices can be multiplied with each other. For example : Let the first matrix be of the order 3X3 and second matrix…
Read more

Transfer data from one Activity to Another Activity in Android



Transfer data with Intents : Download the whole project! We can easily transfer data from one activity to another activity with the use of Intents in Android Application. In this example I am sending the name (set in edit text) from one activity and will use that name in another activity. Create a new project in Eclipse : File => New => Android Application…
Read more

Friday, 5 September 2014

Inheritance in Java



DEFINITION OF INHERITANCE : Inheritance is one of the cornerstones of Object Oriented Programming (OOP) which means to inherit the properties of one class and extends according to the need. The two keywords used in inheritance are extends (for class) and implements (for interface). Inheritance allows the creation of hierarchical classifications. In inheritance…
Read more

Thursday, 4 September 2014

Alert Dialog Tutorial in Android



Alert Dialog : Download the whole project! Alert Dialog is used to display a pop up or dialog in the Activity. It is generally used to ask question from a user with the help of popup dialog at certain event. Creating an Alert Dialog is very easy in Android with the use of AlertDialog class. Create a new project in Eclipse : File => New =>…
Read more

Wednesday, 3 September 2014

Concept of Encapsulation in Java



Concept of Encapsulation in Java : Encapsulation is one of the Object Oriented Programming fundamental means wrapping (encapsulating) up of data or fields in a single method, make each field private (access specifier) and give the access of method to users (by making the method public) and in this way we can save each field from outside world. If we provide…
Read more