Saturday, August 16, 2014

CS 2305 PROGRAMMING PARADIGM - Unit 3

1.What is the byte range? & What is the implementation of destroy method in java.. 
is it native or java code? 
128 to 127 .This method is not implemented. 

2.What is a package? 
To group set of classes into a single unit is known as packaging. Packages provides wide namespace ability. 
  
3.What are the approaches that you will follow for making a program very efficient? 
 By avoiding too much of static methods avoiding the excessive and unnecessary use of synchronized methods Selection of related classes based on the application (meaning synchronized classes for multiuser and non-synchronized classes for single user) Usage of appropriate design patterns Using cache methodologies for remote invocations Avoiding creation of variables within a loop and lot more. 

4. What is Locale? 
 A Locale object represents a specific geographical, political, or cultural region 

5. How will you load a specific locale? 
 Using ResourceBundle.getBundle(…); 

6. What is JIT and its use? 
Really, just a very fast compiler… In this incarnation, pretty much a one-pass compiler — no offline computations. So you can’t look at the whole method, rank the expressions according to which ones are re-used the most, and then generate code. In theory terms, it’s an on-line problem. 


7. Is JVM a compiler or an interpreter? - Interpreter 

8.When you think about optimization, what is the best way to find out the time/memory consuming process? 
Using profiler 

9. What is the purpose of assert keyword used in JDK1.4.x? 
In order to validate certain expressions. It effectively replaces the if block and automatically throws the AssertionError on failure. This keyword should be used for the critical arguments. Meaning, without that the method does nothing. 

10. How will you get the platform dependent values like line separator, path separator, etc., ?
Using Sytem.getProperty(…) (line.separator, path.separator, …) 

11. What is skeleton and stub? what is the purpose of those? 
Stub is a client side representation of the server, which takes care of communicating with the remote server. Skeleton is the server side representation. But that is no more in use… it is deprecated long before in JDK. 

12. What is the final keyword denotes? 
 final keyword denotes that it is the final implementation for that method or variable or class. You can’t override that method/variable/class any more. 

13. What is the significance of ListIterator? 
 You can iterate back and forth

No comments:

Post a Comment