Answer Posted / subrahmanyam
transient
identifies a variable not to be written out when an
instance is serialized (It can'nt be copied to remove
system)
volatile
indicates that the field is used by synchronized threads
and that the compiler should not attempt to perform
optimizations with it.
When more than one thread share a (volatile) data it is
checked every time. Every thread keeps the latest value of
volatile variable
| Is This Answer Correct ? | 30 Yes | 4 No |
Post New Answer View All Answers
What are the three parts of a lambda expression?
Can we have multiple catch block for a try block?
Explain about data types?
Name few java.lang classes introduced with java 8 ?
Explain about automatic type conversion in java?
Why lambda expression is used in java?
What modifiers are allowed for methods in an interface?
What are the differences between string, stringbuffer and stringbuilder?
What is an example of a keyword?
Does treeset allow null in java?
Why declare Main() inside the class in java ?
What is java and their uses?
What is the difference between member variables initialization and assignment in a constructor?
What is a nullable field?
how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT