Search This Blog

Sunday, 30 September 2012

Head to Head comparison iPhone 5 VS Samsung Galaxy |||

I works as android developer. If you ask a developer then android had no competitor in term of challenge and freedom of development tools. You can do almost anything because of its open source nature.
On launch of iPhone 5 i notice the phone in android can compete with iPhone are rare. Only Galaxy S3 can stands in some areas.
Hardware feature and neat and clean design of iPhone 5 drive me crazy. Lets have a look on head to head comparison between both so you able to decide which phone you have to bought


Body and Network Support 

Both phone support 2G, 3G, 4G network. iPhone is little lighter than galaxy s3 but Galaxy s3 wider than  iPhone 5 so we can consider the weight point baseless. In general bigger thing seems to be more heavier

External memory support 

As we already aware that iPhone does not support extra card slot. But it provide enough memory support  16/32/64 GB internal memory support. Galaxy s3 provide same internal memory support but except this it provide memory to be extends up to 64 GB using micro sd card slot. Both has 1 GB of RAM memory. On the sound note both phone are neck to neck

Camera and Other Support

both device have high quality of 8 MP(rear camera)  and almost same the front  camera. iPhone camera support Simultaneous HD video and image recording, touch focus, geo-tagging, face detection, panorama, HDR. And if we have look on S3 camera support then it support Simultaneous HD video and image recording, geo-tagging, touch focus, face and smile detection, image stabilization

Browser and Messaging Support

galaxy S3 support HTML and Adobe Flash but iPhone 5 support only HTML(Safari). In messaging, iPhone support iMessage, SMS (threaded view), MMS, Email, Push Email and Galaxy support SMS(threaded view), MMS, Email, Push Mail, IM, RSS

Where Galaxy lack behind 

Smooth design and Apple hardware are world class . So i think in these Galaxy s3 lack some what not much

Where iPhone lack behind 

Obviously the first loop hole in iPhone is to removing Google map. Their map do no have good user experience. Even though Apple CEO apologies to iPhone user for removing Google Map. And so many Google product does not support well in iPhone. Even though iPhone remove the NFC from iPhone is major
 set back. iPhone does not have flash support also.
                      

Price Comparison

Samsung Galaxy S3 cost in indian rupee is around  Rs 36000 and iPhone cost  Rs 46500.

Which one to prefer 

I hope you do not need to choose and you can have both. But if you are compelled to choose between them then i will recommend Galaxy S3

Saturday, 29 September 2012

Java Interview Questions

Java is my all time favorite programming language because of its strong networking support and other strong features. Facing interview in java is always a challenge because of it broad view of concept.  Some question are repeatedly ask in interview while you goes for java as experience person or as fresher. Some of question i have faced two or three times . I am listing them below so that you guys does not struggle to give answer to them.

Q1. What is the difference between String and String Builder/String Buffer?

Ans. String object is immutable , immutable means we can not change the values store inside a string object. Let a example
                                 String temp="Hello";
If you append anything to temp then it will create a new object if append a different string to temp.
                                temp="Hello"+ "Check";

Printing temp will show "Hello check" but internally we have created two object while append "Check" to temp. Same process goes when you use trim method of String. So to improve performance we recommend to use String Buffer/String Builder. Both are mutable and we can changes the value of them without generating a new object.

Now important point is that String Buffer is synchronized and String Builder is not. So if you are not using threading , use String Builder else String Buffer. String Builder was introduce in java 1.4 but String String Buffer was launched in Java 1.5 version

Q2. What is the difference between Design Pattern and Framework?

Ans. Design Pattern is the Pattern designed by Java to make Java Application. It describe how to divide our complete java application into three part i.e MVC


  • Model : This part will handle only Business logic (Communication with Data Base).
  • View : This part only have presentation logic.
  • Controller : This part of logic contain the overall control flow (What should application has to do when a request comes from a Client).
Framework is a small s/w which has been designed by using Design Pattern. And it contain Web Application deployment architecture 

i.e  Spring, EJB 

Q3. What is the difference between passivation and activation?

Ans. While we client is not using any data then its store on secondary storage, this is called passivation but when client send a request to use that piece of data then it loaded into main memory  and this refers as activation process.

Q4. Explain Difference HashTable and HashMap?

Ans. Here is some key difference between them ---
  •  Hashtable is synchronized, whereas HashMap is not. This makes HashMap better for non-threaded applications, as un synchronized Objects typically perform better than synchronized ones.
  • Hashtable does not allow null keys or values. HashMap allows one null key and any number of null values.
  • One of HashMap's subclasses is LinkedHashMap, so in the event that you'd want predictable iteration order (which is insertion order by default), you could easily swap out the HashMap for a LinkedHashMap. This wouldn't be as easy if you were using Hashtable.
Q5. Differnce between Vector and Array List?

Ans. Vector is synchronized whereas Array List is not synchronized . Using Vector inside threading application is recommended as it avoid insertion and deletion at once by throwing UnSupportedException

Q6. What is difference between Abstract class and Interface ?

Ans. Java does not support multiple inheritance so this restriction is some what avoided using interface . You can implement multiple interface in a single class but can not extends more than one class at time.
  • When you implement an interface to a class then its compulsory to override all method of interface (if class is abstract then its not necessary). But if you extends a abstract , there is no such necessity 
  • Abstract class implementation is fast
  • Interface provide only signature of method not code. but abstract class can have code for method
  • Interface'method is implicitly abstract

Android News and source code