• Android Activity Lifecycle

    Android Activity Lifecycle is controlled by 7 methods of android.app.Activity class. The android Activity is the subclass of ContextThemeWrapper class.An activity is the single screen in android. It is like window or frame of Java.By the help of activity, you can place all your UI components or widgets in a single screen.The 7 lifecycle method […]

    Posted in: Android

  • Android Intent Tutorial

    Android Intent is the message that is passed between components such as activities, content providers, broadcast receivers, services etc.It is generally used with startActivity() method to invoke activity, broadcast receivers etc.The dictionary meaning of intent is intention or purpose. So, it can be described as the intention to do action.The LabeledIntent is the subclass of […]

    Posted in: Android

  • Android ProgressBar

    We can display the android progressbar dialog box to display the status of work being done e.g. downloading file, analyzing status of work etc.In this example, we are displaying the progress dialog for dummy file download operation.Here we are using android.app.ProgressDialog class to show the progress bar. Android ProgressDialog is the subclass of AlertDialog class.The […]

    Posted in: Android

  • Android Analog clock and Digital clock

    Android Analog clock and Digital clock, The android.widget.AnalogClock and android.widget.DigitalClock classes provides the functionality to display analog and digital clocks. Android analog and digital clocks are used to show time in android application. Android AnalogClock is the subclass of View class. Android DigitalClock is the subclass of TextView class. Since Android API level 17, it […]

    Posted in: Android

  • Android TimePicker

    Android TimePicker is a part of the android picker widget that is used to select date. It allows you to select time by hour and minute. You cannot select time by seconds. Android provides this functionality through TimePicker class. The android.widget.TimePicker is the subclass of FrameLayout class. To use TimePicker class, First You have to define the TimePicker […]

    Posted in: Android

  • Android DatePicker

    Android DatePicker is a widget to select date. It allows you to select date by day, month and year. Like DatePicker, android also provides TimePicker to select time. The android.widget.DatePicker is the subclass of FrameLayout class. DatePicker object is also passed into this function. You can use the following methods of the DatePicker to perform […]

    Posted in: Android

  • Inter-thread communication

    Inter-thread communication or Co-operation is all about allowing synchronized threads to communicate with each other. Cooperation (Inter-thread communication) is a mechanism in which a thread is paused running in its critical section and another thread is allowed to enter (or lock) in the same critical section to be executed.It is implemented by following methods of […]

    Posted in: Java

  • Deadlock in java

    Deadlock in java is a part of multithreading. Deadlock can occur in a situation when a thread is waiting for an object lock, that is acquired by another thread and second thread is waiting for an object lock that is acquired by first thread. Since, both threads are waiting for each other to release the […]

    Posted in: Java

  • Static synchronization

    If you make any static method as synchronized, the lock will be on the class not on object. Problem without static synchronization Suppose there are two objects of a shared class(e.g. Table) named object1 and object2.In case of synchronized method and synchronized block there cannot be interference between t1 and t2 or t3 and t4 […]

    Posted in: Java

  • Garbage Collection

    In java, garbage means unreferenced objects. Garbage Collection is process of reclaiming the runtime unused memory automatically. Advantage of Garbage Collection: It makes java memory efficient because garbage collector removes the unreferenced objects from heap memory. It is automatically done by the garbage collector so we don’t need to make extra efforts. How can an […]

    Posted in: Java