TechStack Journal

The regular snapshot of what’s happening in the world of development, tech culture, and engineering practices. A casual and engaging dev journal for early risers, night owls, and anyone who codes with a cup in hand.

Follow publication

Member-only story

Refreshing Core Java: A Quick Revision for Experienced Developers — 2

Refreshing Core Java: A Quick revision for Experienced Developer — 1 : Link

Below are 20 Java questions for experienced developers, along with their answers:

1. What is the difference between Iterator and ListIterator in Java?

Answer:

  • Iterator allows iteration in one direction (forward) and can be used with any Collection (e.g., List, Set).
  • ListIterator is an extension of Iterator and allows bidirectional iteration (forward and backward). It can only be used with List collections and also allows modification of the collection while iterating.

2. What is the purpose of the clone() method in Java?

  • Answer: The clone() method is used to create a copy (clone) of an object. By default, the clone() method performs a shallow copy, meaning the object’s fields are copied, but the references to objects inside the object are not cloned (they point to the same memory address).

3. What is the difference between String and StringBuilder/StringBuffer in terms of performance?

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

TechStack Journal

Published in TechStack Journal

The regular snapshot of what’s happening in the world of development, tech culture, and engineering practices. A casual and engaging dev journal for early risers, night owls, and anyone who codes with a cup in hand.

SAKSHI K
SAKSHI K

Written by SAKSHI K

Java developer at an investment banking firm, building innovative solutions and tackling complex challenges with seamless, scalable code.

No responses yet

Write a response