Core Java APIs
Flashcard 1
Q: What is an API?
A: API stands for Application Programming Interface, allowing computers to communicate
through a common interface.
Flashcard 2
Q: What are the three editions of Java?
A: Java SE (Standard Edition), Java EE (Enterprise Edition), and Java ME (Micro Edition).
Flashcard 3
Q: Name some key core APIs in Java SE.
A: java.lang, java.util, java.io, java.nio, java.math, java.time, java.sql, java.awt, javax.swing,
java.beans, java.security, java.lang.reflect, java.concurrent, java.stream.
Flashcard 4
Q: How does Java handle strings for memory efficiency?
A: Java uses the String Pool, which stores string literals to reduce memory usage by reusing
common strings.
Flashcard 5
Q: What is the difference between String and StringBuilder?
A: String is immutable, meaning it cannot be changed once created, while StringBuilder is
mutable, allowing modifications.
Flashcard 6
Q: List some important methods in the String class.
A: length(), charAt(), indexOf(), substring(), toLowerCase(), toUpperCase(), equals(),
contains(), replace(), and trim().
Flashcard 7
Q: What are the primary operations of StringBuilder?
A: append() and insert(), used to add or insert characters into the string builder.
Flashcard 8
Q: Give an example of using method chaining in Java.
A: String result = "example".toUpperCase().trim().substring(0, 3);
Flashcard 9
Q: What does replace() do in the String class?
A: Replaces each occurrence of a specified substring with another substring.
Flashcard 10
Q: Name an expert-level StringBuilder challenge.
A: Implement a Caesar Cipher encoder and decoder using StringBuilder.