Thursday, 24 March 2016

Common Errors in Android and their solutions:

1. WARNING: unable to write jarlist cache file C:\Users\admin\workspace\appcompat_v7\bin\jarlist.cache


Solution:

This problem occurs when you choose minimum SDK version as 2.2 and the solution is to choose minimum SDK version as 14.

Saturday, 19 March 2016

Android Interview questions

Android Interview Questions-Understanding Android in a better way.

Q.What is the use of Super keyword?

Whenever we override a function in Java,we can do it in two ways:
1.Changing the functionality of the function totally.
2.Keeping the super class features of a function as it is and adding some additional features.

Eg: Suppose you have a class called Object which has OnDestroy() function and you have another class TextView which is a child class of Object and here you want OnDestroy () to be called without destroying the features of Object class and implementing extra in TextView.


Q.Does Java support multiple inheritance or multilevel inheritance?

Java doesn't support multiple inheritance because it creates ambiguity.Hence we can have only one super class in Java.
Eg: Consider a base class A which has a function called Add() and this base class has two child Classes called B and C.Both of these classes override Add() in their own way. now suppose multiple inheritance was allowed then a class D can extend both B and C .(Here D will be the child of both B and C)Now if D wants to override Add() it will lead into confusion.

Multilevel Inheritance is just a chain of inheritance.That is one class will have only one super class which in turn has another super class and so on.


Q.Does java support Operator overloading?

No.It is a feature of C++.

Q.What are volatile variables in Java?

The value of this variable will never be cached thread locally all reads and writes will go straight to main memory