Most frequent questions java and c++

Posted by Unknown at 18:23

 Java and C++

A: Some of the similarities and differences are in the table:
Features Java C/C++
Pointer No Yes
Operator Overload No Yes
Typedef, Define,
Preprocessors No Yes
Structures, Unions No Yes
Enums No Yes
Functions No (only methods within classes) Yes
Goto statement No Yes
Automatic CoercionsNo(types should be converted explicitly) Yes
Global Variables No. Variable is part of a class Yes
Templates No Yes
Private, Protected, Public
Inheritance No Yes
Default parameters No Yes
Garbage Collection Yes No
Multi-thread support Yes No
Multiple Inheritance
Yes. Supports only interface inheritance and not implementation inheritance!
Yes
Exception Handling
Yes. try/catch must be defined if the function declares that it may throw an exception.
Yes. You may not include the try/catch even if the function
throws an exception.
Function Overload Yes Yes
Internationalization Yes Yes
Include of other Objects #import #include
Comments "//","/* */,/** */ "//","/* */"


If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!


Kindly Bookmark and Share it:

YOUR ADSENSE CODE GOES HERE

0 comments:

Have any question? Feel Free To Post Below:

Blog Archive

 

© 2011. All Rights Reserved | Interview Questions | Template by Blogger Widgets

Home | About | Top