0% found this document useful (0 votes)
2 views2 pages

Core Java APIs

The document provides an overview of core Java APIs, including definitions of API and the three editions of Java: SE, EE, and ME. It highlights key core APIs in Java SE, explains string handling for memory efficiency, and differentiates between String and StringBuilder. Additionally, it lists important methods for both String and StringBuilder, along with examples of method chaining and a challenge related to StringBuilder.

Uploaded by

Gabor Komuves
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Core Java APIs

The document provides an overview of core Java APIs, including definitions of API and the three editions of Java: SE, EE, and ME. It highlights key core APIs in Java SE, explains string handling for memory efficiency, and differentiates between String and StringBuilder. Additionally, it lists important methods for both String and StringBuilder, along with examples of method chaining and a challenge related to StringBuilder.

Uploaded by

Gabor Komuves
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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.

You might also like