Explain OOP concepts with an example program in Java.
Asked in the Technical + HR interview stage. Followed by Java collections framework and SQL query questions.
For the SQL portion, retrieve the four core OOP concepts and their corresponding Java examples from the provided tables.
concept_name, definition, and java_example.| Column | Type | Description |
|---|---|---|
| concept_idPK | INT | Unique identifier for an OOP concept |
| concept_name | VARCHAR(50) | Name of the OOP concept |
| definition | TEXT | Short explanation of the concept |
| is_core | BOOLEAN | Whether the concept is one of the four core OOP concepts |
| display_order | INT | Required presentation order |
| Column | Type | Description |
|---|---|---|
| example_idPK | INT | Unique identifier for an example |
| concept_id | INT | Referenced OOP concept |
| java_example | TEXT | Java code illustrating the concept |
| review_status | VARCHAR(20) | Review state of the example |