Answered Questions

  • What are the main differences between Java and C++?

    Everything is an object in Java (Single root hierarchy as everything gets derived from java.lang.Object). Java does not have all the complicated aspects of C++ ( For ex: Pointers, templates, unions, operator overloading, structures etc..) The Java language promoters initially said "No pointers!", but when many programmers questioned how you can work without pointers, the promoters began saying "Restricted...

    himanshu sindhwani

    • Oct 19th, 2016

    No Java is not purely object oriented as it contains primitive data types

    Mansi pardesi

    • Aug 20th, 2015

    Why in Java int have 4 bytes and C++ int have 2 bytes

  • How does Java handle integer overflows and underflows

    It uses those low order bytes of the result that can fit into the size of the type allowed bythe operation.

    Sony V George

    • Apr 5th, 2007

    In java there is no point of overflow and underflow, it was there in C. For avoiding that java introduces type casting. Java will allow some more space from the defult space of primtive type.