Computer Knowledge

Java Core Classes and Threads

1,935 Questions

Java core classes and threads form the foundation of object oriented programming and are crucial for IT officer and programming exams. This includes concepts like string mutability, collections, and multithreading. Solve these questions to test your practical coding and theoretical knowledge.

String and StringBuffer classesThread execution methodsJava collections frameworkCharacter streams input outputVariable serialization rules

Java Core Classes and Threads Questions

Multiple choice
  1. RegularExpressionValidator

  2. RegularPatternValidator

  3. CompareValidator

  4. CustomValidator

  5. RequiredFieldValidator

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

RegularExpressionValidator control in ASP.NET is used to check the user input based on a pattern that we define using RegularExpression. If the value does not match with the RegularExpression, then an error message is displayed.

Multiple choice
  1. Post is safer then Get method.

  2. Post requests are not stored in browser's history.

  3. Post requests cannot be bookmarked.

  4. Post request have no restriction on data length.

  5. Post exposes the data in the URL.

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

The data is not visible in the URL. The Get method displays the data in the QueryString. This makes Post a safer choice than the Get method.

Multiple choice
  1. TimeOut

  2. Destroy

  3. Abandon

  4. Remove

  5. Session.Contents.Remove

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The Abandon method destroys all the objects stored in a Session object and releases their resources. If you do not call the Abandon method explicitly, the server destroys these objects when the session times out.