Saturday, 28 June 2014

Oops Concept in Java

1. Data Hiding : Hiding of the data , so that outside class can not access that data.By using the private modifier we can implement the data hiding. The main advantage of data hiding is we can achieve the security. Example of data hiding: public class Account {  private double balance=20000;...

Tuesday, 24 June 2014

Difference Between Array and Collection

Difference Between Array and Collection Array Collection  1. Size of arrays are fixed.  1. Size of collection are growable in nature we can increase or decrease the size as our requirement. 2. Memory point of view array concept not recommended to use.2. Memory point of view collection concept highly recommended to use. 3. Arrays can hold only homogeneous elements. 3. Collection...

Sunday, 22 June 2014

Difference Between Method Overloading and Overriding

Difference Between Method Overloading and Overriding Method Overloading Method Overriding 1. Method name must be same. 1. Method name must be same. 2. Method argument must be different. 2. Method arguments must be same. 3. Method signature must be different. 3. Method signature must be same. 4. Return type can be changed. 4. Return type must be same until 1.4v but after 1.5v co-variant...

Saturday, 21 June 2014

Difference Between Abstract class and Interface

Difference Between Abstract class and Interface. Abstract Class Interface 1. If we are talking about implementation but not completely (partially implementation) then go for abstract class. 1. If we does know anything about the implementation then we should go for the interface. 2. Every method present in abstract class need not be abstract ,it can be not abstract also. 2. Every method present...

Difference Between C++ and Java

Difference Between C++ and Java C++ Java 1. C++ is an extension of C with Object oriented behavior , C++ is not complete object oriented language as Java. 1. Java is complete object oriented language. 2. C++ supports pointer concept. 2. Java does not support pointer. 3. At compilation stage C++ source code converted into machine level code. 3. At compilation stage Java source code converted...

Difference Betwee C and C++

Difference Between C and C++ C C++ 1. C is Procedural Language. 1. C++ is non Procedural i.e Object oriented Language. 2. In C, Polymorphism is not possible. 2. The concept of polymorphism is used in C++.Polymorphism is the most Important Feature of OOPS. 3. Inheritance is not possible in C. 3. Inheritance is possible in C++. 4. Virtual Functions are not present in C. 4. The concept...

Wednesday, 18 June 2014

Java Classes And Objects

In object-oriented programming technique, we design a program using objects and classes. Object is the physical as well as logical entity whereas class is the logical entity only. Object in Java:Object is the real world entity that has state and behavior. e.g. laptop, bike, dog , pen, table, car etc....