Computer Knowledge

Java Core Classes and Threads

1,473 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. worker thread

  2. UI thread

  3. service call

  4. foreground process

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

In Android, View.post(Runnable) executes the Runnable on the UI thread (main thread). This method is commonly used to update UI elements from background threads, as all UI operations must occur on the UI thread. The posted Runnable executes after the current message queue processing, ensuring thread-safe UI updates.