Computer Knowledge
Java Core Classes and Threads
1,935 QuestionsJava 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
Reveal answer
Fill a bubble to check yourself
Match the following:
| 1. Event | A. Object that receives notification when an event happens. |
| 2. Event Handler | B. A method that actually handles the event |
| 3. Event Listener | C. Button Presses, Touching the screen |
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself
Match the Event Handlers with the Event listeners:
| 1. onClick() | A. OnFocusChangeListener() |
| 2. onLongClick() | B. OnClickListener() |
| 3. onFocusChange() | C. OnLongClickListener() |
| 4. onKey() | D. OnMenuItemClickListener() |
| 5. onTouch() | E. OnTouchListener() |
| 6. onMenuItemClick() | F. OnKeyListener() |
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself
Match the callback methods in an activity class with their description.
| (a) onCreate() | 1. It is called when the first activity is created. |
| (b) onStart() | 2. It is called when activity restarts after stopping it. |
| (c) onResume() | 3. It is called before the activity is destroyed by the system. |
| (d) onPause() | 4. It is called when the activity is no longer visible. |
| (e) onStop() | 5. It is called when the activity becomes visible to the user. |
| (f) onDestroy() | 6. It is called when the user starts interacting with the application. |
| (g) onRestart() | 7. When It is called, the paused activity does not receive any further user input and cannot execute any code. |
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself
Reveal answer
Fill a bubble to check yourself