Interview Questions and Answers for 'Nuance' - 3 question(s) found - Order By Rating Q1. What are transient variables in java? Core Java
Ans. Transient variables are variable that cannot be serialized. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   serialization   transient Asked in 15 Companies intermediate   rare Related Questions Which of the following combination of keywords is illegal in Java ?
a. static and transient
b. transient and final
c. static and synchronized
d. abstract and final Which keyword is used to provide explicit access of a code block to single thread ?
a. Transient
b. Final
c. Explicit
d. Synchronized Can we declare static variables as transient ? What is the use of Transient Keyword ? Which of the following is true ? Variables of an interface are intrinsically ...
a. transient
b. final
c. public
d. static Frequently asked to fresh graduates. Ans. Process is a program in execution whereas thread is a separate path of execution in a program. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   threads   multi threading   operating system   process vs thread Asked in 24 Companies basic   frequent Related Questions What is a Deadlock ? What is the difference between time slicing and preemptive scheduling ? What are the difference between Threads and Processes ? Why threads block or enters to waiting state on I/O? What is the difference between yield() and sleep()? What is the initial state of a thread when it is created and started? What is suspend() method used for ? Difference between suspend() and stop() ? What is a daemon thread? Give an Example ? Very frequently asked. Favorite question in Walk in Drive of many Indian service companies. Frequently asked in HCL Technologies, TCS and Accenture. Q3. What is the difference between final, finally and finalize() ? Core Java
Ans. final - constant variable, objects cannot be de-referenced, restricting method overriding, restricting class sub classing.
finally - handles exception. The finally block is optional and provides a mechanism to clean up regardless of what happens within the try block. Use the finally block to close files or to release other system resources like database connections, statements etc.
finalize() - method helps in garbage collection. A method that is invoked before an object is discarded by the garbage collector, allowing it to clean up its state. Sample Code for final Sample Code for finally Sample Code for finalize Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java   oops   final   finally   finalize   final vs finally vs finalize Asked in 61 Companies basic   frequent Try 4 Question(s) TestRelated Questions Difference between final and effectively final ? Why is effectively final even required ? Which of the following combination of keywords is illegal in Java ?
a. static and transient
b. transient and final
c. static and synchronized
d. abstract and final What is a final method ? Which keyword is used to provide explicit access of a code block to single thread ?
a. Transient
b. Final
c. Explicit
d. Synchronized Enums cannot be declared .. What is a Final Variable ? Should we override finalize method ? Will the static block be executed in the following code ? Why ? Can we override compareTo method for Enumerations ?