1. The easy way if you are using an oracle database, this gets them all in one
query
select name
from table
start with id = ?
connect by parent = prior id
2. use a stack
Brief example...
class Person {
int id;
String name;
Person(int id, String name) {
this.id = id;
1. The easy way if you are using an oracle database, this gets them all in
one query
select name
from table
start with id = ?
connect by parent = prior id
2. use a stack
Brief example...
class Person {
int id;
String name;
Person(int id, String name) {
this.id = id;
this.name =