StringBuffer vs StringBuilder

  According to javadoc, StringBuilder is designed as a replacement for StringBuffer in single-threaded usage. Their key differences in simple term: StringBuffer is designed to be thread-safe and all public methods in StringBuffer are synchronized. StringBuilder does not handle thread-safety issue and none of its methods is synchronized. StringBuilder has better performance than StringBuffer under ...

executeQuery, executeUpdate and execute

executeQuery public ResultSet executeQuery() throws SQLException Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query. Returns: a ResultSet object that contains the data produced by the query; never null Throws: SQLException – if a database access error occurs or the SQL statement does not return a ResultSet ...

TreeMap

The TreeMap class implements the Map interface by using a tree. A TreeMap provides an efficient means of storing key/value pairs in sorted order, and allows rapid retrieval. You should note that, unlike a hash map, a tree map guarantees that its elements will be sorted in ascending key order. The TreeMap class supports four ...

Recommended books for GATE (Computer Science)

Recommended books for GATE (Computer Science)

NITIE’s Preparation Kit

** Read each and every section of  NITIE’s site and NITIE’s brochure Q. When was NITIE established ? National Institute of Industrial Engineering (NITIE) was established by the Government of India in 1963 with the assistance of United Nations Development Programme (UNDP) through the International Labor Organization (ILO) to create skilled professionals. Q. What ‘was’ and what ‘is’ ...

Restoring your Active Windows Desktop

Yesterday I experienced the Monday blues in form of a white screen desktop. The “Restore My Active Desktop” button wasn’t working and was giving a javascript error that “Object type doesn’t support that action”. The white screen was so difficult to look at  that by evening I was having a severe headache. So the first ...

Socratic Touch…

Socratic Touch...
Who is Socrates? Socrates ( 469 BC – 399 BC) was a classical Greek Athenian philosopher.   Credited as one of thefounders of Western philosophy, he is an enigmatic figure known chiefly through the accounts of later classical writers, especially the writings of his students Plato and Xenophon, and the plays of his contemporary Aristophanes. ...

Wait-die and Wound-wait Schemes 11

Wait-die scheme: It is a non-preemptive technique for deadlock prevention. When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if it has a timestamp smaller than that of Tj (That is Ti is older than Tj), otherwise Ti is rolled back (dies) For example: Suppose that transaction T22, T23, T24 have time-stamps 5, 10 and ...

Validation Based Protocol

It imposes less overhead Also based on Timestamp Protocol. It has three phases: Read Phase: During this phase, the system executes transaction Ti. . It reads the values of the various data items and stores them in variable local to Ti. It performs all the write operations on temporary local variables without update of the actual database. ...

Mathematical Logic – Well Formed Formulas

A propositional variable is similar to any real variable you see in mathematics. For example xis a variable that can take any mathematical value. Similarly, a propositional variable, say P, can take any proposition as a value. The proposition as a value is called a propositional constant. Definition: WFFs produce a proposition.  To construct a WFF ...