GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 229 of 502    Print  
1)whats the difference in data types of java and c++?
2)what is the use of finally block??
3)what is encapsulation in oops?how is it achieved in Java?

  
Total Answers and Comments: 5 Last Update: May 31, 2006     Asked by: kishore 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 16, 2006 02:06:42   #1  
rajsekhar        

RE: 1)whats the difference in data types of java and c...
The types supported by Java are the primitive data types classes interfaces and arrays. C++ supports a variety of types including primitive types classes structs unions and defined types. The C++ typedef construct does not have an analog in Java. C++ also supports enumerated data types and Java does not. C++ is much more flexible in providing implicit casting between types. Java supports C++-style casting operators but does not support implicit casting to the same extent as C++.
 
Is this answer useful? Yes | No
May 16, 2006 02:27:57   #2  
satish        

RE: 1)whats the difference in data types of java and c...

3 answer

the wrapping of data and functions into a single unit is called encapsulation


 
Is this answer useful? Yes | No
May 23, 2006 08:30:28   #3  
sujata        

RE: 1)whats the difference in data types of java and c...
encapsulation is the mechanism that binds together code and the data it manipulates and keep both safe from outside interference and misuse.
 
Is this answer useful? Yes | No
May 25, 2006 00:01:08   #4  
shubha        

RE: 2.what is the use of finally block

hi

2.finally block can be used to handle any exception generated within a try block.it may be added immediately after the try block or after the last catch block.when a finally block is defined this is guranteed to execute regardless of whether or not an exception is thrown.

tq


 
Is this answer useful? Yes | No
May 31, 2006 02:20:13   #5  
shirisha49 Member Since: May 2006   Contribution: 1    

RE: 1)whats the difference in data types of java and c...
hi there The code enclosed in finally block is a must-execute code. Whether an exception is raised or not it doesn't matter. If finally code block is embedded after an exception-handling block then the control must pass to finally block either after try-catch or no try-catch.Shirisha K.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape