1/31
These flashcards cover essential Java programming concepts and components relevant for the final exam.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Encapsulation
Hiding internal details and showing only functionalities.
Inheritance
Mechanism where one class acquires properties of another.
Polymorphism
Ability of an object to take on many forms.
Abstraction
Hiding complex implementation details and showing only essentials.
executeUpdate()
Executes SQL commands like INSERT, UPDATE, DELETE.
executeQuery()
Executes SQL SELECT queries and returns ResultSet.
Event Handling Steps
Create Event Source -> Create Listener -> Register Listener.
ActionListener Interface
Responds to action events like button clicks; uses actionPerformed().
Button Creation
Button b = new Button("Click Me");
TextField Retrieval
Use tf.getText() to get input from a text field.
Method Overloading
Same method name but different parameters.
Method Overriding
Child class redefines a parent method with same signature.
Constructor Rules
No return type; name must match class.
Object Class Methods
Includes toString(), equals(), hashCode(), clone().
Interfaces in Java
Contain only public, abstract methods and public static final fields.
Implementing an Interface
Use 'implements' keyword in class declaration.
UML Class Diagram
Top: Class Name; Middle: Fields; Bottom: Methods.
UML Inheritance
Solid line and hollow arrow pointing to parent class.
Native Apps
Built specifically for Android/iOS platforms.
Web Apps
Accessed through a browser, not installed.
Hybrid Apps
Combination of native and web technologies.
RelativeLayout
Widgets positioned relative to others using IDs.
FrameLayout
Stacks multiple views on top of each other.
Good Layout Practice
Minimize layout depth for better performance.
Android Modes
Design Mode, Code Mode, Split Mode.
onCreate() Method
Initializes activity; sets content view.
setContentView()
Loads XML layout into an activity.
MVC Pattern in Android
Model: Data, View: UI Layouts, Controller: Activity logic.
Activity Component
Screen with a user interface.
Service Component
Runs background operations with no UI.
Broadcast Receiver
Listens for system-wide broadcast messages.
Content Provider
Shares data between apps, e.g., contacts.