Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Java: Cross-Site Request Forgery (CSRF)

Front

What are Stateless JWT tokens, and what are their trade-offs?

Stateless JWT tokens eliminate the need for server-side session storage but might expose sensitive data if not carefully…

View Card →
Flashcard Study

Java: Cross-Site Request Forgery (CSRF)

Front

What is SQL Injection, and how can it be prevented?

SQL Injection involves malicious SQL code insertion; it can be prevented by using prepared statements. SQL Injection is…

View Card →
Flashcard Study

Java: Cross-Site Request Forgery (CSRF)

Front

Describe the Spring Security filter chain?

The Spring Security filter chain is a series of filters that intercept requests to provide security services. In…

View Card →
Flashcard Study

Java: Cross-Site Request Forgery (CSRF)

Front

Why is it crucial to use bcrypt for password storage?

Bcrypt hashes passwords with adjustable work factors to increase hashing time, making attacks computationally harder. Bcrypt is a…

View Card →
Flashcard Study

Java: Cross-Site Request Forgery (CSRF)

Front

How does stateless JWT authentication work?

JWTs are self-contained tokens that include all necessary claims for authentication within their payload. A JSON Web Token…

View Card →
Flashcard Study

Java: Cross-Site Request Forgery (CSRF)

Front

How would you explain a CSRF token in an interview?

A CSRF token is a unique, unpredictable value generated for each user session to protect against cross-site request…

View Card →
Flashcard Study

Java: Upcasting and Dynamic Dispatch

Front

What does upcasting buy you?

It lets callers depend on an abstraction while runtime behavior still comes from the concrete object. Upcasting narrows…

View Card →
Flashcard Study

Java: this Keyword

Front

How would you explain a common beginner mistake with 'this' in constructors in an interview?

Confusing local variables with instance fields. Beginners often forget to use 'this' to differentiate between parameter names and…

View Card →
Flashcard Study

Java: this Keyword

Front

Why is 'this' not usable in static methods?

'this' refers to an instance, not accessible in static context. Static methods belong to the class itself, not…

View Card →
Flashcard Study

Java: this Keyword

Front

How does 'this' enhance code readability?

It explicitly shows which variables are instance fields. When reading object-oriented code, 'this' signals that a variable belongs…

View Card →