Thursday, December 3, 2015

Java - Multithreading


Java - Multithreading

Java is a multi threaded programming language which means we can develop multi threaded program using Java.A multi threaded program contains two or more parts that can run concurrently and each part can handle different task at the same time making optimal use of the available resources specially when your computer has multiple CPUs.



Eg Scenario : To make you all understand about thread i will use easy example 
its like this we will get google chrome as our programme. When we using chrome we will open new tabs while we using current tab.threads also like similar to chrome process. we can use thread to process different task at the same time.Hope you have proper idea about  Multithreading.













Process Behind the Multithreads :


  • Each thread having private run time stack
  • If multi thread execute in same method each threads will have their own copy of local variables & methods 


There are two ways to create a thread

  1. Sub-classing the THREAD class & instantiating a new object of the class
  2. Implementing the RUNNABLE interface
* But in both class we need to implement method  called run();

Monday, November 30, 2015

Ionic Framework - Hybrid Mobile App



Ionic is a framework which provide easy way to build up mobile application which will support to IOS & Android platforms.Basically here they use HTML,CSS,Angula JS, Codova & More elements to develop application.



Above image will give you brief description about ionic framework architecture. Currently there are pretty nice apps on app stores(IOS & ANDROID)  developed using ionic.

You can learn more bout ionic using this link : http://ionicframework.com/

Sunday, November 1, 2015

ENCAPSULATION


Encapsulation when we talking about this its simple idea we can remind capsules which we using to take as medicine.mainly here what they doing is protecting the things inside from the outside world.This will keep contain together also it will protect the contents inside.


In OOP it will take attributes & behaviors & it will bundle together in same unit as class.after encapsulate your class we cant access to this class without having particular behaviors.It will help to control outside access & keep security of data.

Here we will open inputs & outputs to outside but without using input you cant change inside details.this is simple example for Encapsulation.

ABSTRACTION



Abstraction considering their important characteristics and ignore all specific instance. Abstraction not  having specific instance it will represent common facts. Abstract classes are something in the middle between classes and interfaces. They can define ordinary methods and abstract methods.


Eg:  inside class room we can have students.when we going to implement classes here we using one class called student.Which will contain common instance like student name,student id, student registration number & etc.but we never going to create class under each & every student name n his details .

This abstract classes will not contain individual specific  data of particular object.



Polymorphism


In Object-oriented programming,polymorphism(from the Greek meaning "having multiple forms") is the characteristic of being able to assign a different meaning or usage to something in different contexts-specifically,to allow an entity such as a variable,a function or an abject to have more than one form.There are several different kinds of polymorphism.

Thursday, October 29, 2015

INHERITNCE

Inheritance is a fundamental principle of object-oriented programming. It allows a class to "inherit" (behavior or characteristics) of another, more general class. For example, a lion belongs to the biological family of cats (Felidae). All cats that have four paws, are predators and hunt their prey. This functionality can be coded once in the Felidae class and all its predators can reuse it – TigerPumaBobcat, etc. Inheritance is described as is-kind-of relationship, e.g. Tiger is kind ofAnimal.



Introduction to Object-Oriented Programming 



Object Oriented Programming will be mainly divided on 4 principles.These are like heart of OOP.


  • Inheritance
  • Abstract
  • Polymorphism
  • Encapsulation      

Here there are the main principles of Object oriented programming.We will these main principles one by one with next our posts.Object-oriented programming is the successor of procedural (structural) programming. Procedural programming describes programs as groups of reusable code units (procedures) which define input and output parameters. Procedural programs consist of procedures, which invoke each other.